next up previous contents index
Next: 18.4.3 oskit_wrap_asyncio: Wrap an Up: 18.4 Thread-safe Adaptors Previous: 18.4.1 oskit_wrap_socket: Wrap an

18.4.2 oskit_wrap_stream: Wrap an oskit_stream in a thread-safe adaptor

 

SYNOPSIS

#include <oskit/com/wrapper.h>

oskit_error_t oskit_wrap_stream(struct oskit_stream *in, void (*lock)(void *), void (*unlock)(void *), void *cookie, struct oskit_stream **out);

DESCRIPTION

Create and return an oskit_dir thread-safe adaptor.

PARAMETERS

in
The oskit_stream COM interface to be wrapped.
lock
The process lock routine.
unlock
The process unlock routine.
cookie
A cookie to be passed to the lock and unlock routines.
out
The oskit_stream adaptor COM interface.

RETURNS

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



University of Utah Flux Research Group