Functions | |
status_t | rename_process (int nProcessID, const char *pzName) |
Rename a process. More... | |
int | alloc_tld (void) |
Allocate a TLD slot. More... | |
int | free_tld (int nHandle) |
Release a TLD slot. More... | |
status_t | delete_semaphore (sem_id hSema) |
Delete a kernel semaphore. More... | |
status_t | lock_semaphore_ex (sem_id hSema, int nCount, uint32 nFlags, bigtime_t nTimeOut) |
Aquire a semaphore. More... | |
status_t | lock_semaphore (sem_id hSema, uint32 nFlags, bigtime_t nTimeOut) |
Lock a semaphore. More... | |
status_t | unlock_semaphore_ex (sem_id hSema, int nCount) |
Release a semaphore. More... | |
status_t | unlock_semaphore (sem_id hSema) |
Release a semaphore. More... | |
status_t | unlock_and_suspend (sem_id hWaitQueue, sem_id hSema) |
Unlock a reqular semaphore and block on a wait-queue. More... | |
status_t | spinunlock_and_suspend (sem_id hWaitQueue, SpinLock_s *psLock, uint32 nCPUFlags, bigtime_t nTimeout) |
Release a sinlock and block on a wait-queue in one atomic operation. More... | |
status_t | sleep_on_sem (sem_id hSema, bigtime_t nTimeOut) |
Non conditionally block on a semaphore (wait-queue). More... | |
status_t | wakeup_sem (sem_id hSema, bool bAll) |
Wake up threads blocked on a wait-queue. More... | |
int | create_device_node (int nDeviceID, const char *pzPath, const DeviceOperations_s *psOps, void *pCookie) |
Publish a device-node inside the /dev/ directory. More... | |
int | delete_device_node (int nHandle) |
Remove a device node from the /dev/ directory. More... | |
int | rename_device_node (int nHandle, const char *pzNewPath) |
Rename and/or move a device node. More... | |
int | decode_disk_partitions (device_geometry *psDiskGeom, Partition_s *pasPartitions, int nMaxPartitions, void *pCookie, disk_read_op *pfReadCallback) |
Decode a hard-disk partition table. More... | |
int | based_open (int nRootFD, const char *pzPath, int nFlags,...) |
Open a file relative to a given directory. More... | |
int | freadlink (int nFile, char *pzBuffer, size_t nBufSize) |
Read the content of an previously opened symlink. More... |
|
Allocate a TLD slot.
|
|
Open a file relative to a given directory.
nRootFD .
The "real" current working directory is not affected. This provide a thread-safe way to do do the following:
int nOldDir = open( ".", O_RDONLY ); fchdir( nRootFD ); nFile = open( pzPath, ... ); fchdir( nOldDir ); close( nOldDir ); The problem with the above example in a multithreaded environment is that other threads will be affected by the change of current working directory and might get into trouble while we temporarily change it. Using based_open() is also more efficient since only one kernel-call is done (based_open() is just as efficient as open()).
|
|
Publish a device-node inside the /dev/ directory.
|
|
Decode a hard-disk partition table.
The partition table is validated and the function will fail if it is found invalid. Checks performed includes overlaping partitions, partitions ending outside the disk and the primary table containing more than one extended partition.
|
|
Remove a device node from the /dev/ directory.
|
|
Delete a kernel semaphore.
|
|
Read the content of an previously opened symlink.
Normally when passing a symlink path to open() it will automatically open the file/dir that the link points to and not the link itself. To stop open() from traversing the links you can add the O_NOTRAVERSE flag to the open-mode. open() will then return a file-handle representing the link itself rather than the file the link points at.
|
|
Release a TLD slot.
|
|
Lock a semaphore.
|
|
Aquire a semaphore.
|
|
Rename and/or move a device node.
|
|
Rename a process.
|
|
Non conditionally block on a semaphore (wait-queue).
|
|
Release a sinlock and block on a wait-queue in one atomic operation.
|
|
Unlock a reqular semaphore and block on a wait-queue.
|
|
Release a semaphore.
|
|
Release a semaphore.
|
|
Wake up threads blocked on a wait-queue.
|