X hits on this document

PDF document

February 10, 2006 - page 235 / 238

582 views

0 shares

0 downloads

0 comments

235 / 238

time) to perform one operation (a timeout, file operation,

etc.) then return. is NULL, then this

This return a standard errno. will wait forever. */

If timeout

int

(*perform

_

one_op)(os_handler_t struct timeval

*handler, *timeout);

/* Loop continuously handling operations.

This

function

does

not

return. */ void (*operation

_

loop)(os

_

handler

_

t

*handler);

/*

The following are no longer implemented because they race-prone, unneeded, and/or difficult to implement.

are You

may

safely set these to NULL, but they are here for backwards

compatability with old os handlers. */ int (*is_locked)(os_handler_t *handler,

os_hnd_lock_t *id); int (*create_rwlock)(os_handler_t *handler,

os_hnd_rwlock_t **id); int (*destroy_rwlock)(os_handler_t *handler,

os_hnd_rwlock_t *id); i n t ( * r e a d _ l o c k ) ( o s _ h a n d l e r _ t * h a n d l e r ,

os_hnd_rwlock_t *id); int (*read_unlock)(os_handler_t *handler,

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

os_hnd_rwlock_t *id); int (*write_unlock)(os_handler_t *handler,

o s _ h n d _ r w l o c k _ t * i d ) ;

i n t ( * i s _ r e a d l o c k e d ) ( o s _ h a n d l e r _ t

*handler,

o s _ h n d _ r w l o c k _ t * i d ) ;

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

*handler,

os_hnd_rwlock_t *id);

/* Database storage and retrieval routines.

These are used by

things in OpenIPMI to speed up various operations by caching data locally instead of going to the actual system to get them.

The key routine

is a arbitrary length character string.

returns

an

error

on

failure.

Otherwise,

The find if it can

fetch

the

data

without

delay,

it

allocates

a

block

of

data

and

returns it in data fetch_completed to

(with true.

the length in data_len) and sets Otherwise, if it cannot fetch the

d a t a w i t h o u t d e l a y , i t w i l l s e t f e t c h _ c o m p l e t e d t o f a l s start the database operation, calling got_data() when it done. e

and is

223

Document info
Document views582
Page views582
Page last viewedMon Dec 05 16:47:07 UTC 2016
Pages238
Paragraphs8090
Words85809

Comments