X hits on this document

PDF document

February 10, 2006 - page 234 / 238

584 views

0 shares

0 downloads

0 comments

234 / 238

222

APPENDIX L. OS HANDLER INTERFACE (OS HANDLER.H)

for upper layers if doesn’t use theses,

they need you don’t

them.

have

to

If your upper layer

provide

them.

*/

/* Condition variables, like in POSIX Threads. */ int (*create_cond)(os_handler_t *handler,

os_hnd_cond_t **cond); int (*destroy_cond)(os_handler_t *handler,

os_hnd_cond_t *cond); i n t ( * c o n d _ w a i t ) ( o s _ h a n d l e r _ t * h a n d l e r , o s _ h n d _ c o n d _ t * c o n d , o s _ h n d _ l o c k _ t * l o c k ) ;

os_hnd_cond_t

*cond,

os_hnd_lock_t

*lock,

/* The timeout here is relative, no int (*cond_timedwait)(os_handler_t

t absolute. */ *handler,

struct timeval *timeout); i n t ( * c o n d _ w a k e ) ( o s _ h a n d l e r _ t * h a n d l e r os_hnd_cond_t *cond); , i n t ( * c o n d _ b r o a d c a s t ) ( o s _ h a n d l e r _ t * h a n d l e os_hnd_cond_t *cond); r ,

/* Thread management */

i n t ( * c r e a t e _ t h r e a d ) ( o s _ h int void void

andler t

_

*handler, priority, (*startup)(void *data), *data);

/* Terminate the running thread. */ int (*thread_exit)(os_handler_t *handler);

/* Should *NOT* be used by the user, this is for the OS handler’s internal use. */ void *internal_data;

/***************************************************************/

/*

These are basic function on the OS handler that are here

for

convenience to the

proper.

Depending

user. on the

These are not used by OpenIPMI specific OS handler, these may

or may

not

be

implemented.

If

you

are

not

sure,

check

for

NULL.

*/

/*

Free

the

OS

handler

passed

in.

After

this

call,

the

OS

handler

may not be used any more. before this is called. */

May sure that nothing is using it

void (*free_os_handler)(os_handler_t *handler);

/* Wait up to the amount of time specified in timeout (relative

Document info
Document views584
Page views584
Page last viewedMon Dec 05 19:01:28 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments