Argon RTOS  1.3.0
Tiny embedded real-time kernel
Argon RTOS
+ Collaboration diagram for Argon RTOS:

Description

Common definitions and kernel APIs.

Modules

 Threads
 Thread API.
 
 Semaphores
 Semaphore API.
 
 Mutexes
 Mutex API.
 
 Channels
 Channel API.
 
 Queues
 Queue API.
 
 Timers
 Timer API.
 
 Run Loops
 Run loop API.
 
 Time Utilities
 Various time related utility functions.
 
 Atomic Operations
 Atomic operation functions.
 
 Configuration
 Documentation of the configuration macros.
 

Files

file  ar_classes.h
 Header for the Argon RTOS wrapper classes.
 
file  ar_config.h
 Configuration settings for the Argon RTOS.
 
file  ar_kernel.h
 Header for the Argon RTOS C API.
 
file  argon.h
 Main header for the Argon RTOS.
 

Enumerations

enum  _ar_timeouts {
  kArNoTimeout,
  kArInfiniteTimeout
}
 Timeout constants. More...
 
enum  ar_status_t {
  kArSuccess,
  kArTimeoutError,
  kArObjectDeletedError,
  kArQueueFullError,
  kArQueueEmptyError,
  kArInvalidPriorityError,
  kArStackSizeTooSmallError,
  kArNotFromInterruptError,
  kArNotOwnerError,
  kArAlreadyUnlockedError,
  kArInvalidParameterError,
  kArTimerNotRunningError,
  kArTimerNoRunLoop,
  kArOutOfMemoryError,
  kArInvalidStateError,
  kArAlreadyAttachedError,
  kArRunLoopAlreadyRunningError,
  kArRunLoopStopped,
  kArRunLoopQueueReceived
}
 Argon status and error codes. More...
 

Kernel

void ar_kernel_run (void)
 Start the kernel running. More...
 
bool ar_kernel_is_running (void)
 Returns whether the kernel is running or not.
 
uint32_t ar_get_system_load (void)
 Returns the current system load. More...
 

Enumeration Type Documentation

◆ _ar_timeouts

Timeout constants.

Enumerator
kArNoTimeout 

Return immediately if a resource cannot be acquired.

kArInfiniteTimeout 

Pass this value to wait forever to acquire a resource.

◆ ar_status_t

Argon status and error codes.

Enumerator
kArSuccess 

Operation was successful.

kArTimeoutError 

Timeout while blocked on an object.

kArObjectDeletedError 

An object was deleted while a thread was blocked on it. This may be a semaphore, mutex, or queue.

kArQueueFullError 

The queue is at maximum capacity and cannot accept more elements.

kArQueueEmptyError 

No elements are in the queue.

kArInvalidPriorityError 

The requested thread priority is invalid.

kArStackSizeTooSmallError 

The thread's stack size is too small.

kArNotFromInterruptError 

The requested operation cannot be performed from interrupt context.

kArNotOwnerError 

The caller is not the owning thread.

kArAlreadyUnlockedError 

The mutex is already unlocked.

kArInvalidParameterError 

An invalid parameter value was passed to the function.

kArTimerNotRunningError 

The timer is not running.

kArTimerNoRunLoop 

The timer is not associated with a run loop.

kArOutOfMemoryError 

Allocation failed.

kArInvalidStateError 

The thread is an invalid state for the given operation.

kArAlreadyAttachedError 

The object is already attached to a runloop.

kArRunLoopAlreadyRunningError 

The runloop is already running on another thread.

kArRunLoopStopped 

The runloop was stopped.

kArRunLoopQueueReceived 

The runloop exited due to a value received on an associated queue.

Function Documentation

◆ ar_get_system_load()

uint32_t ar_get_system_load ( void  )

Returns the current system load.

The system load is calculated by the idle thread, if the AR_ENABLE_SYSTEM_LOAD configuration setting is enabled. If this setting is disabled, the load will always be zero.

Returns
The current system load percentage from 0-100.

◆ ar_kernel_run()

void ar_kernel_run ( void  )

Start the kernel running.

Once this function is called, the kernel will begin scheduling threads.

Note
This call will not return.