The Pedigree Project 0.1
Functions
pocketknife Namespace Reference

Functions

EXPORTED_PUBLIC void * runConcurrentlyAttached (int(*func)(void *), void *param)
 
EXPORTED_PUBLIC int attachTo (void *handle)
 
EXPORTED_PUBLIC bool attachToForCompletion (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

◆ attachTo()

int pocketknife::attachTo ( void *  handle)

Join the given handle returned from runConcurrentlyAttached.

Definition at line 41 of file pocketknife.cc.

References Thread::join().

Referenced by sys_thread_join().

+ Here is the caller graph for this function:

◆ attachToForCompletion()

bool pocketknife::attachToForCompletion ( void *  handle)

Join the given handle without allowing terminal requests to abandon the wait. Use only for owned worker teardown.

Definition at line 50 of file pocketknife.cc.

References Thread::joinForCompletion().

Referenced by ProducerConsumer::destroy(), and sys_thread_join().

+ Here is the caller graph for this function:

◆ runConcurrentlyAttached()

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 29 of file pocketknife.cc.

References Process::getParent(), and ProcessorBase::information().

Referenced by sys_thread_new().

+ Here is the caller graph for this function: