#include <sys/proc.h>


/*Using msleep

In addition to Mach and I/O Kit routines, BSD provides msleep, which is the recommended way to delay in the BSD portions of the kernel. In other parts of the kernel, you should with either use wait_queue functions or use assert_wait and thread_wakeup functions, both of which are closely tied to the Mach scheduler, and are described in “Kernel Thread APIs”.

The msleep call is similar to a condition variable. It puts a thread to sleep until wakeup or wakeup_one is called on that channel. Unlike a condition variable, however, you can set a timeout measured in clock ticks. This means that it is both a synchronization call and a delay. The prototypes follow:msleep(void *channel, lck_mtx_t *mtx, int priority, const char *wmesg,  struct  timespec *timeout);
msleep0(vvoid *channel, lck_mtx_t *mtx, int priority, const char  *wmesg, uint64_t  deadline);
wakeup(void *channel);
wakeup_one(void *channel);*/
void wakeup(void *channel){
printf ("wakeup",channel);
};


int proc_selfpid(void){
printf ("proc_selfpid");
};

int	msleep(void *chan, lck_mtx_t *mtx, int pri, const char *wmesg, struct timespec * ts ){
printf ("msleep",chan,mtx,pri,wmesg,ts);
};

int proc_pid(proc_t A){
printf ("proc_pid",A);
};
