The Pedigree Project  0.1
Functions
pocketknife Namespace Reference

Functions

EXPORTED_PUBLIC void runConcurrently (int(*func)(void *), void *param)
 
EXPORTED_PUBLIC void * runConcurrentlyAttached (int(*func)(void *), void *param)
 
EXPORTED_PUBLIC int attachTo (void *handle)
 

Detailed Description

pocketknife contains utilities that perform common tasks.

It's somewhat designed so it can be also used as a light compatibility layer but it should be assumed that you can do Pedigree-specific stuff here.

Function Documentation

int pocketknife::attachTo ( void *  handle)

Join the given handle returned from runConcurrentlyAttached.

Definition at line 52 of file pocketknife.cc.

References Thread::join().

void pocketknife::runConcurrently ( int(*)(void *)  func,
void *  param 
)

Run the given function concurrently with the given parameter.

The thread that is created by this function is detached and cannot be joined. Use this to run a small function asynchronously if you don't care about its return value or stopping it later.

Definition at line 29 of file pocketknife.cc.

References Thread::detach(), and Processor::information().

Referenced by sys_thread_new().

+ Here is the caller graph for this function:

void * pocketknife::runConcurrentlyAttached ( int(*)(void *)  func,
void *  param 
)

Run the given function concurrently with the given parameter.

The handle returned can be used to join the thread and retrieve its return value.

Definition at line 40 of file pocketknife.cc.

References Processor::information().