X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fkern%2Fproc.h;h=bacd052be848fdebf85b826ece98fb527a88ca63;hb=863f8ebdc1af60ca64e0cf4474bfea4b9e6b45b1;hp=842566b9db08cc3a77488b7092c866f9eff12b2e;hpb=ae8a609173e4490fd03875f96e388038053b9288;p=bertos.git diff --git a/bertos/kern/proc.h b/bertos/kern/proc.h index 842566b9..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,7 +168,7 @@ INLINE void __proc_noop(void) * Preemptive scheduler: private methods. */ #define preempt_switch proc_switch - #define preempt_init proc_schedInit + #define preempt_wakeup proc_wakeup #else /** * Co-operative scheduler: public methods. @@ -179,7 +180,7 @@ INLINE void __proc_noop(void) * Co-operative scheduler: private methods. */ #define coop_switch proc_switch - #define proc_schedInit __proc_noop + #define coop_wakeup proc_wakeup #endif void proc_rename(struct Process *proc, const char *name); @@ -193,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);