next up previous contents index
Next: 7.7.8 fs_wakeup: Wakeup any Up: 7.7 Dependencies on the Previous: 7.7.6 fs_gettime: Get the

7.7.7 fs_tsleep: Wait for a wakeup on a channel or for a timeout

 

SYNOPSIS

#include <oskit/fs/fs.h>

oskit_error_t fs_tsleep(void *chan, oskit_u32_t pri, char *wmesg, oskit_u32_t timo);

DIRECTION

filesystem library tex2html_wrap_inline32841 client OS

DESCRIPTION

This function waits for a wakeup to occur on sleep channel chan or until timo microseconds have elapsed. Upon waking up, the thread is assigned priority pri. If timo is zero, then this function waits until a wakeup occurs.

A sleep channel is simply an identifier for an event; typically, chan will be the address of some variable used by the filesystem library.

PARAMETERS

chan
The sleep channel.
pri
The priority upon wakeup.
wmesg
A description of the sleep state.
timo
The timeout for the sleep.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



University of Utah Flux Research Group