|
IntrOS
|
job queues (procedures executed by the receiving task) More...
Macros | |
| #define | OS_JOB_BUFFER(buf, size) |
| define job queue data buffer | |
| #define | OS_JOB(job, limit) |
| define and initialize a job queue object | |
| #define | static_JOB(job, limit) |
| static alias of OS_JOB() | |
| #define | JOB_INIT(limit) |
| create and initialize a job queue object | |
| #define | JOB_CREATE(limit) |
| create and initialize a job queue object | |
| #define | JOB_NEW JOB_CREATE |
| alias of JOB_CREATE() | |
Functions | |
| void | job_init (job_t *job, fun_t **data, size_t bufsize) |
| initialize a job queue object | |
| void | job_reset (job_t *job) |
| reset the job queue object and wake up all waiting tasks with 'E_STOPPED' event | |
| void | job_kill (job_t *job) |
| alias of job_reset() | |
| int | job_take (job_t *job) |
| try to transfer job data from the job queue object and execute the job procedure, don't wait if the job queue object is empty | |
| int | job_tryWait (job_t *job) |
| alias of job_take() | |
| int | job_takeAsync (job_t *job) |
| Async alias of job_take(). | |
| int | job_waitFor (job_t *job, cnt_t delay) |
| try to transfer job data from the job queue object and execute the job procedure, wait for given duration of time while the job queue object is empty | |
| int | job_waitUntil (job_t *job, cnt_t time) |
| try to transfer job data from the job queue object and execute the job procedure, wait until given timepoint while the job queue object is empty | |
| int | job_wait (job_t *job) |
| try to transfer job data from the job queue object and execute the job procedure, wait indefinitely while the job queue object is empty | |
| int | job_waitAsync (job_t *job) |
| Async alias of job_wait(). | |
| int | job_give (job_t *job, fun_t *fun) |
| try to transfer job data to the job queue object, don't wait if the job queue object is full | |
| int | job_giveAsync (job_t *job, fun_t *fun) |
| Async alias of job_give(). | |
| int | job_sendFor (job_t *job, fun_t *fun, cnt_t delay) |
| try to transfer job data to the job queue object, wait for given duration of time while the job queue object is full | |
| int | job_sendUntil (job_t *job, fun_t *fun, cnt_t time) |
| try to transfer job data to the job queue object, wait until given timepoint while the job queue object is full | |
| int | job_send (job_t *job, fun_t *fun) |
| try to transfer job data to the job queue object, wait indefinitely while the job queue object is full | |
| int | job_sendAsync (job_t *job, fun_t *fun) |
| Async alias of job_send(). | |
| void | job_push (job_t *job, fun_t *fun) |
| transfer job data to the job queue object, remove the oldest job data if the job queue object is full | |
| unsigned | job_count (job_t *job) |
| return the amount of data contained in the job queue | |
| unsigned | job_space (job_t *job) |
| return the amount of free space in the job queue | |
| unsigned | job_limit (job_t *job) |
| return the size of the job queue | |
job queues (procedures executed by the receiving task)
| #define OS_JOB_BUFFER | ( | buf, | |
| size ) |
| #define OS_JOB | ( | job, | |
| limit ) |
define and initialize a job queue object
| job | name of a pointer to job queue object |
| limit | size of a queue (max number of stored job procedures) |
| #define static_JOB | ( | job, | |
| limit ) |
| #define JOB_INIT | ( | limit | ) |
create and initialize a job queue object
| limit | size of a queue (max number of stored job procedures) |
| #define JOB_CREATE | ( | limit | ) |
create and initialize a job queue object
| limit | size of a queue (max number of stored job procedures) |
| void job_init | ( | job_t * | job, |
| fun_t ** | data, | ||
| size_t | bufsize ) |
initialize a job queue object
| job | pointer to job queue object |
| data | job queue data buffer |
| bufsize | size of the data buffer (in bytes) |
| void job_reset | ( | job_t * | job | ) |
reset the job queue object and wake up all waiting tasks with 'E_STOPPED' event
| job | pointer to job queue object |
| int job_take | ( | job_t * | job | ) |
try to transfer job data from the job queue object and execute the job procedure, don't wait if the job queue object is empty
| job | pointer to job queue object |
| E_SUCCESS | job data was successfully transferred from the job queue object |
| E_TIMEOUT | job queue object is empty, try again |
| int job_waitFor | ( | job_t * | job, |
| cnt_t | delay ) |
try to transfer job data from the job queue object and execute the job procedure, wait for given duration of time while the job queue object is empty
| job | pointer to job queue object |
| delay | duration of time (maximum number of ticks to wait while the job queue object is empty)
|
| int job_waitUntil | ( | job_t * | job, |
| cnt_t | time ) |
try to transfer job data from the job queue object and execute the job procedure, wait until given timepoint while the job queue object is empty
| job | pointer to job queue object |
| time | timepoint value |
|
inline |
try to transfer job data from the job queue object and execute the job procedure, wait indefinitely while the job queue object is empty
| job | pointer to job queue object |
| E_SUCCESS | job data was successfully transferred from the job queue object |
| E_STOPPED | job queue object was reseted (unavailable for async version) |
| int job_give | ( | job_t * | job, |
| fun_t * | fun ) |
try to transfer job data to the job queue object, don't wait if the job queue object is full
| job | pointer to job queue object |
| fun | pointer to job procedure |
| E_SUCCESS | job data was successfully transferred to the job queue object |
| E_TIMEOUT | job queue object is full, try again |
| int job_sendFor | ( | job_t * | job, |
| fun_t * | fun, | ||
| cnt_t | delay ) |
try to transfer job data to the job queue object, wait for given duration of time while the job queue object is full
| job | pointer to job queue object |
| fun | pointer to job procedure |
| delay | duration of time (maximum number of ticks to wait while the job queue object is full)
|
| int job_sendUntil | ( | job_t * | job, |
| fun_t * | fun, | ||
| cnt_t | time ) |
try to transfer job data to the job queue object, wait until given timepoint while the job queue object is full
| job | pointer to job queue object |
| fun | pointer to job procedure |
| time | timepoint value |
|
inline |
try to transfer job data to the job queue object, wait indefinitely while the job queue object is full
| job | pointer to job queue object |
| fun | pointer to job procedure |
| E_SUCCESS | job data was successfully transferred to the job queue object |
| E_STOPPED | job queue object was reseted (unavailable for async version) |
| void job_push | ( | job_t * | job, |
| fun_t * | fun ) |
transfer job data to the job queue object, remove the oldest job data if the job queue object is full
| job | pointer to job queue object |
| fun | pointer to job procedure |
| unsigned job_count | ( | job_t * | job | ) |
return the amount of data contained in the job queue
| job | pointer to job queue object |
| unsigned job_space | ( | job_t * | job | ) |
return the amount of free space in the job queue
| job | pointer to job queue object |
| unsigned job_limit | ( | job_t * | job | ) |
return the size of the job queue
| job | pointer to job queue object |