Interface to allocate memory from system heap
Set the current task state to blocked
Set the current task state to blocked
Finds the resolution (or precision) of a clock.
Get the current time of a clock.
Sleep a clock for a specified number of nanoseconds.
Interface to deallocate a memory region from the system heap
manipulate file descriptor
Like synch::futex_wait
, but does extra sanity checks and takes a timespec
.
Like synch::futex_wake
, but does extra sanity checks.
Determine the priority of the current thread
Returns the number of processors currently online.
Returns the processor frequency in MHz.
Returns the base page size, in bytes, of the current system.
Get the system’s clock time.
The function computes a sequence of pseudo-random integers
in the range of 0 to RAND_MAX
Fill len
bytes in buf
with cryptographically secure random data.
read()
attempts to read nbyte
of data to the object referenced by the
descriptor fd
from a buffer. read()
performs the same
action, but scatters the input data from the iovcnt
buffers specified by the
members of the iov array: iov[0], iov[1], ..., iov[iovcnt-1]
.
Shrink or grow a block of memory to the given new_size
. The block is described by the given
ptr pointer and layout. If this returns a non-null pointer, then ownership of the memory block
referenced by ptr has been transferred to this allocator. The memory may or may not have been
deallocated, and should be considered unusable (unless of course it was transferred back to the
caller again via the return value of this method). The new memory block is allocated with
layout, but with the size updated to new_size.
If this method returns null, then ownership of the memory block has not been transferred to this
allocator, and the contents of the memory block are unaltered.
Create a cryptographicly secure 32bit random number with the support of
the underlying hardware. If the required hardware isn’t available,
the function returns -1
.
Create a cryptographicly secure 64bit random number with the support of
the underlying hardware. If the required hardware isn’t available,
the function returns -1.
Destroy and deallocate a semaphore.
Create a new, unnamed semaphore.
Release a semaphore.
Try to acquire a lock on a semaphore.
Try to acquire a lock on a semaphore.
Set priority of the current thread
Set priority of the thread with the identifier id
The function sets its argument as the seed for a new sequence
of pseudo-random numbers to be returned by rand()
Wake up the task with the identifier id
write()
attempts to write nbyte
of data to the object referenced by the
descriptor fd
from a buffer. writev()
performs the same
action, but gathers the output data from the iovcnt
buffers specified by the
members of the iov array: iov[0], iov[1], ..., iov[iovcnt-1]
.