X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fproc.h;h=bacd052be848fdebf85b826ece98fb527a88ca63;hb=82aa9864bc5accc468d3c9ed109a8b44ef36da94;hp=390099da4b771789c5aa55741526f25284163330;hpb=d9d931610bca1df6ceb9227eacc9ff2c7f89b77a;p=bertos.git diff --git a/bertos/kern/proc.h b/bertos/kern/proc.h index 390099da..bacd052b 100644 --- a/bertos/kern/proc.h +++ b/bertos/kern/proc.h @@ -148,6 +148,7 @@ void proc_exit(void); void proc_yield(void); void proc_preempt(void); int proc_needPreempt(void); +void proc_wakeup(Process *proc); /** * Dummy function that defines unimplemented scheduler class methods. @@ -167,6 +168,7 @@ INLINE void __proc_noop(void) * Preemptive scheduler: private methods. */ #define preempt_switch proc_switch + #define preempt_wakeup proc_wakeup #else /** * Co-operative scheduler: public methods. @@ -178,6 +180,7 @@ INLINE void __proc_noop(void) * Co-operative scheduler: private methods. */ #define coop_switch proc_switch + #define coop_wakeup proc_wakeup #endif void proc_rename(struct Process *proc, const char *name); @@ -191,7 +194,11 @@ const char *proc_currentName(void); * the returned pointer to the correct type. * \return Pointer to the user data of the current process. */ -iptr_t proc_currentUserData(void); +INLINE iptr_t proc_currentUserData(void) +{ + extern struct Process *current_process; + return current_process->user_data; +} int proc_testSetup(void); int proc_testRun(void);