Expand description
ArceOS user program library for C apps.
§Cargo Features
- CPU
smp: Enable SMP (symmetric multiprocessing) support.fp-simd: Enable floating point and SIMD support.
- Interrupts:
- Interrupt handling is always available.
- Memory
alloc: Enable dynamic memory allocation.tls: Enable thread-local storage.
- Task management
- Multi-threading and timer-driven scheduling are always available.
- Upperlayer stacks
fs: Enable file system support.net: Enable networking support.
- Lib C functions
Functions§
- abort⚠
- Abort the current process.
- clock_
gettime ⚠ - Get clock time since booting
- exit⚠
- Exits the current thread.
- getpid⚠
- Get current thread ID.
- getrlimit⚠
- Get resource limitations
- longjmp⚠
longjmpimplementation- mktime⚠
- Convert broken-down time into time since the Epoch.
- nanosleep⚠
- Sleep some nanoseconds
- pthread_
create ⚠ - Create a new thread with the given entry point and argument.
- pthread_
detach ⚠ - Marks a joinable thread detached so it is reclaimed automatically.
- pthread_
exit ⚠ - Exits the current thread. The value
retvalwill be returned to the joiner. - pthread_
join ⚠ - Waits for the given thread to exit, and stores the return value in
retval. - pthread_
mutex_ ⚠init - Initialize a mutex.
- pthread_
mutex_ ⚠lock - Lock the given mutex.
- pthread_
mutex_ ⚠unlock - Unlock the given mutex.
- pthread_
self ⚠ - Returns the
pthreadstruct of current thread. - rand⚠
- Returns a 32-bit unsigned pseudo random interger.
- random⚠
- Returns a 64-bit unsigned pseudo random number.
- read⚠
- Read data from the file indicated by
fd. - setjmp⚠
setjmpimplementation- setrlimit⚠
- Set resource limitations
- srand⚠
- Sets the seed for the random number generator.
- strerror⚠
- Returns a pointer to the string representation of the given error code.
- sysconf⚠
- Return system configuration infomation
- write⚠
- Write data to the file indicated by
fd. - writev⚠
- Write a vector.