|
ChibiOS/RT 7.0.6
|

Data Structures | |
| struct | ch_jobs_queue |
| Type of a jobs queue. More... | |
| struct | ch_job_descriptor |
| Type of a job descriptor. More... | |
Macros | |
| #define | MSG_JOB_NULL ((msg_t)-3) |
Dispatcher return code in case of a JOB_NULL has been received. | |
Typedefs | |
| typedef struct ch_jobs_queue | jobs_queue_t |
| Type of a jobs queue. | |
| typedef void(* | job_function_t) (void *arg) |
| Type of a job function. | |
| typedef struct ch_job_descriptor | job_descriptor_t |
| Type of a job descriptor. | |
Functions | |
| static void | chJobObjectInit (jobs_queue_t *jqp, size_t jobsn, job_descriptor_t *jobsbuf, msg_t *msgbuf) |
| Initializes a jobs queue object. | |
| static job_descriptor_t * | chJobGet (jobs_queue_t *jqp) |
| Allocates a free job object. | |
| static job_descriptor_t * | chJobGetI (jobs_queue_t *jqp) |
| Allocates a free job object. | |
| static job_descriptor_t * | chJobGetTimeoutS (jobs_queue_t *jqp, sysinterval_t timeout) |
| Allocates a free job object. | |
| static job_descriptor_t * | chJobGetTimeout (jobs_queue_t *jqp, sysinterval_t timeout) |
| Allocates a free job object. | |
| static void | chJobPostI (jobs_queue_t *jqp, job_descriptor_t *jp) |
| Posts a job object. | |
| static void | chJobPostS (jobs_queue_t *jqp, job_descriptor_t *jp) |
| Posts a job object. | |
| static void | chJobPost (jobs_queue_t *jqp, job_descriptor_t *jp) |
| Posts a job object. | |
| static void | chJobPostAheadI (jobs_queue_t *jqp, job_descriptor_t *jp) |
| Posts an high priority job object. | |
| static void | chJobPostAheadS (jobs_queue_t *jqp, job_descriptor_t *jp) |
| Posts an high priority job object. | |
| static void | chJobPostAhead (jobs_queue_t *jqp, job_descriptor_t *jp) |
| Posts an high priority job object. | |
| static msg_t | chJobDispatch (jobs_queue_t *jqp) |
| Waits for a job then executes it. | |
| static msg_t | chJobDispatchTimeout (jobs_queue_t *jqp, sysinterval_t timeout) |
| Waits for a job then executes it. | |
| #define MSG_JOB_NULL ((msg_t)-3) |
Dispatcher return code in case of a JOB_NULL has been received.
Definition at line 47 of file chjobs.h.
Referenced by chJobDispatch(), and chJobDispatchTimeout().
| typedef struct ch_jobs_queue jobs_queue_t |
Type of a jobs queue.
| typedef void(* job_function_t) (void *arg) |
| typedef struct ch_job_descriptor job_descriptor_t |
Type of a job descriptor.
|
inlinestatic |
Initializes a jobs queue object.
| [out] | jqp | pointer to a jobs_queue_t structure |
| [in] | jobsn | number of jobs available |
| [in] | jobsbuf | pointer to the buffer of jobs, it must be able to hold jobsn job_descriptor_t structures |
| [in] | msgbuf | pointer to the buffer of messages, it must be able to hold jobsn msg_t messages |
Definition at line 138 of file chjobs.h.
References chDbgCheck, chGuardedPoolLoadArray(), chGuardedPoolObjectInit(), chMBObjectInit(), ch_jobs_queue::free, and ch_jobs_queue::mbx.

|
inlinestatic |
Allocates a free job object.
| [in] | jqp | pointer to a jobs_queue_t structure |
Definition at line 158 of file chjobs.h.
References chGuardedPoolAllocTimeout(), ch_jobs_queue::free, and TIME_INFINITE.

|
inlinestatic |
Allocates a free job object.
| [in] | jqp | pointer to a jobs_queue_t structure |
| NULL | if a job object is not immediately available. |
Definition at line 172 of file chjobs.h.
References chGuardedPoolAllocI(), and ch_jobs_queue::free.

|
inlinestatic |
Allocates a free job object.
| [in] | jqp | pointer to a jobs_queue_t structure |
| [in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
|
| NULL | if a job object is not available within the specified timeout. |
Definition at line 192 of file chjobs.h.
References chGuardedPoolAllocTimeoutS(), and ch_jobs_queue::free.

|
inlinestatic |
Allocates a free job object.
| [in] | jqp | pointer to a jobs_queue_t structure |
| [in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
|
| NULL | if a job object is not available within the specified timeout. |
Definition at line 213 of file chjobs.h.
References chGuardedPoolAllocTimeout(), and ch_jobs_queue::free.

|
inlinestatic |
Posts a job object.
| [in] | jqp | pointer to a jobs_queue_t structure |
| [in] | jp | pointer to the job object to be posted |
Definition at line 228 of file chjobs.h.
References chDbgAssert, chDbgCheck, chMBPostI(), ch_jobs_queue::mbx, and MSG_OK.

|
inlinestatic |
Posts a job object.
| [in] | jqp | pointer to a jobs_queue_t structure |
| [in] | jp | pointer to the job object to be posted |
Definition at line 246 of file chjobs.h.
References chDbgAssert, chDbgCheck, chMBPostTimeoutS(), ch_jobs_queue::mbx, MSG_OK, and TIME_IMMEDIATE.

|
inlinestatic |
Posts a job object.
| [in] | jqp | pointer to a jobs_queue_t structure |
| [in] | jp | pointer to the job object to be posted |
Definition at line 264 of file chjobs.h.
References chDbgAssert, chDbgCheck, chMBPostTimeout(), ch_jobs_queue::mbx, MSG_OK, and TIME_IMMEDIATE.

|
inlinestatic |
Posts an high priority job object.
| [in] | jqp | pointer to a jobs_queue_t structure |
| [in] | jp | pointer to the job object to be posted |
Definition at line 282 of file chjobs.h.
References chDbgAssert, chDbgCheck, chMBPostAheadI(), ch_jobs_queue::mbx, and MSG_OK.

|
inlinestatic |
Posts an high priority job object.
| [in] | jqp | pointer to a jobs_queue_t structure |
| [in] | jp | pointer to the job object to be posted |
Definition at line 300 of file chjobs.h.
References chDbgAssert, chDbgCheck, chMBPostAheadTimeoutS(), ch_jobs_queue::mbx, MSG_OK, and TIME_IMMEDIATE.

|
inlinestatic |
Posts an high priority job object.
| [in] | jqp | pointer to a jobs_queue_t structure |
| [in] | jp | pointer to the job object to be posted |
Definition at line 318 of file chjobs.h.
References chDbgAssert, chDbgCheck, chMBPostAheadTimeout(), ch_jobs_queue::mbx, MSG_OK, and TIME_IMMEDIATE.

|
inlinestatic |
Waits for a job then executes it.
| [in] | jqp | pointer to a jobs_queue_t structure |
| MSG_OK | if a job has been executed. |
| MSG_RESET | if the internal mailbox has been reset. |
| MSG_JOB_NULL | if a JOB_NULL has been received. |
Definition at line 336 of file chjobs.h.
References chDbgAssert, chGuardedPoolFree(), chMBFetchTimeout(), ch_jobs_queue::free, ch_job_descriptor::jobarg, ch_job_descriptor::jobfunc, ch_jobs_queue::mbx, MSG_JOB_NULL, MSG_OK, and TIME_INFINITE.

|
inlinestatic |
Waits for a job then executes it.
| [in] | jqp | pointer to a jobs_queue_t structure |
| [in] | timeout | the number of ticks before the operation timeouts, the following special values are allowed:
|
| MSG_OK | if a job has been executed. |
| MSG_TIMEOUT | if a timeout occurred. |
| MSG_RESET | if the internal mailbox has been reset. |
| MSG_JOB_NULL | if a JOB_NULL has been received. |
Definition at line 377 of file chjobs.h.
References chDbgAssert, chGuardedPoolFree(), chMBFetchTimeout(), ch_jobs_queue::free, ch_job_descriptor::jobarg, ch_job_descriptor::jobfunc, ch_jobs_queue::mbx, MSG_JOB_NULL, and MSG_OK.
