jcs
/subtext
/amendments
/350
uthread: Add uthread_wakeup
jcs made amendment 350 about 1 year ago
--- uthread.c Sun Feb 5 11:13:11 2023
+++ uthread.c Tue Feb 28 19:02:38 2023
@@ -172,6 +172,13 @@ uthread_msleep(unsigned long millis)
}
void
+uthread_wakeup(struct uthread *uthread)
+{
+ uthread->sleeping_until = 0;
+ uthread_yield();
+}
+
+void
uthread_begin(struct uthread *uthread)
{
register unsigned long stack_loc = uthread->stack_loc;
--- uthread.h Thu Aug 11 16:37:17 2022
+++ uthread.h Tue Feb 28 17:58:38 2023
@@ -54,6 +54,7 @@ struct uthread *uthread_add(void *func, void *arg);
void uthread_yield(void);
void uthread_coordinate(void);
void uthread_msleep(unsigned long millis);
+void uthread_wakeup(struct uthread *uthread);
void uthread_verify(void);
#endif /* __UTHREAD_H__ */