They seem to make lots of good flash cms templates that has animation and sound.

[ Pobierz całość w formacie PDF ]

" MAX_MQX_UINT (Failure.)
See also :
" _mutex_lock
" _task_set_error
" MUTEX_STRUCT
CAUTION
On failure, calls _task_set_error to set the task error code to
MQX_EINVAL.
2.9.16 _mutex_init
Initializes the mutex.
Source :
Prototype :_mqx_uint _mutex_init(register MUTEX_STRUCT_PTR mutex_ptr, register
MUTEX_ATTR_STRUCT_PTR attr_ptr);
Table 2-68. _mutex_init arguments
Name Type Direction Description
register mutex_ptr input Pointer to where the mutex is to be initialized.
MUTEX_STRUCT_PTR
register attr_ptr input Pointer to an initialized mutex attributes structure or NULL
MUTEX_ATTR_STRUC (use default attributes as defined for _mutatr_init).
T_PTR
Returns :
" MQX_EOK
" MQX_EINVAL (Mutex_ptr is NULL, attr_ptr is not initialized or a value in attr_ptr
is not correct.)
" MQX_INVALID_COMPONENT_BASE (Mutex component data is not valid.)
" MQX_OUT_OF_MEMORY
Freescale MQX"! Lite RTOS, Rev. Version 1.1
74 Freescale Semiconductor, Inc.
Chapter 2 MQX Lite Functions
See also :
" _mutex_destroy
" _mutatr_init
" MUTEX_STRUCT
" MUTEX_ATTR_STRUCT
CAUTION
Creates the mutex component if it was not previously created.
2.9.17 _mutex_lock
Locks the mutex.
Source :
Prototype :_mqx_uint _mutex_lock(register MUTEX_STRUCT_PTR mutex_ptr);
Table 2-69. _mutex_lock arguments
Name Type Direction Description
register mutex_ptr input Pointer to the mutex to be locked.
MUTEX_STRUCT_PTR
Returns :
" MQX_EOK
" MQX_CANNOT_CALL_FUNCTION_FROM_ISR (Function cannot be called from
an ISR.)
" MQX_EINVAL (Mutex_ptr is NULL or mutex was destroyed.)
" MQX_EDEADLK (Task already has the mutex locked.)
" MQX_EBUSY (Mutex is already locked.)
See also :
" _mutex_init
" _mutex_try_lock
" _mutex_unlock
" _mutatr_init
" _mutatr_get_wait_protocol
" _mutatr_set_wait_protocol
" _mutex_destroy
" MUTEX_STRUCT
Description :
Freescale MQX"! Lite RTOS, Rev. Version 1.1
Freescale Semiconductor, Inc. 75
Mutexes
If the mutex is already locked, the task waits according to the waiting protocol of the
mutex.
CAUTION
Might block the calling task. Cannot be called from an ISR.
2.9.18 _mutex_set_priority_ceiling
Sets the priority of the mutex.
Source :
Prototype :_mqx_uint _mutex_set_priority_ceiling(MUTEX_STRUCT_PTR mutex_ptr, _mqx_uint
ceiling, _mqx_uint_ptr old_ceiling_ptr);
Table 2-70. _mutex_set_priority_ceiling arguments
Name Type Direction Description
MUTEX_STRUCT_PTR mutex_ptr input Pointer to the mutex.
_mqx_uint ceiling input New priority ceiling.
_mqx_uint_ptr old_ceiling_ptr output Pointer to the previous priority ceiling.
Returns :
" MQX_EOK
" MQX_EINVAL (Mutex_ptr does not point to a valid mutex structure or priority_ptr
is NULL)
See also :
" _mutex_get_priority_ceiling
" _mutex_init
" MUTEX_STRUCT
Description :
The functions operate on an initialized mutex; whereas, _mutatr_get_priority_ceiling and
_mutatr_set_priority_ceiling operate on an initialized mutex attributes structure.
2.9.19 _mutex_test
Tests the mutex component.
Source :
Freescale MQX"! Lite RTOS, Rev. Version 1.1
76 Freescale Semiconductor, Inc.
Chapter 2 MQX Lite Functions
Prototype :_mqx_uint _mutex_test(pointer _PTR_ mutex_error_ptr);
Table 2-71. _mutex_test arguments
Name Type Direction Description
pointer_PTR_ mutex_error_ptr output Pointer to the invalid queue or to the mutex with the error (see
return).
Returns :
" MQX_OK No errors were found (mutex_error_ptr = NULL).
" MQX_INVALID_COMPONENT_BASE Mutex component data is not valid
(mutex_error_ptr = NULL).
" MQX_EINVAL A mutex is not valid or a mutex queue is not valid (mutex_error_ptr
= pointer to the mutex with the error).
" MQX_CORRUPT_QUEUE Queue of mutexes is not valid (mutex_error_ptr =
pointer to the invalid queue).
See also :
" _mutex_create_component
" _mutex_init
Description :
The function tests:
- mutex component data
- MQX queue of mutexes
- each mutex
- waiting queue of each mutex
CAUTION
Disables and enables interrupts.
2.9.20 _mutex_try_lock
Tries to lock the mutex.
Source :
Prototype :_mqx_uint _mutex_try_lock(register MUTEX_STRUCT_PTR mutex_ptr);
Freescale MQX"! Lite RTOS, Rev. Version 1.1
Freescale Semiconductor, Inc. 77
Mutexes
Table 2-72. _mutex_try_lock arguments
Name Type Direction Description
register mutex_ptr input Pointer to the mutex.
MUTEX_STRUCT_PTR
Returns :
" MQX_EOK
" MQX_EBUSY (Mutex is currently locked.)
" MQX_EDEADLK (Task already has the mutex locked.)
" MQX_EINVAL (Mutex_ptr is NULL or mutex has been destroyed.)
See also :
" _mutex_create_component
" _mutex_init
" _mutex_lock
" _mutex_unlock
" _mutatr_init
" MUTEX_STRUCT
Description :
If the mutex is not currently locked, the task locks it. If the mutex is currently locked, the
task continues to run; it does not block.
2.9.21 _mutex_unlock
Unlocks the mutex.
Source :
Prototype :_mqx_uint _mutex_unlock(register MUTEX_STRUCT_PTR mutex_ptr);
Table 2-73. _mutex_unlock arguments
Name Type Direction Description
register mutex_ptr input Pointer to the mutex.
MUTEX_STRUCT_PTR
Returns :
" MQX_EOK
" MQX_EINVAL
See also :
Freescale MQX"! Lite RTOS, Rev. Version 1.1
78 Freescale Semiconductor, Inc.
Chapter 2 MQX Lite Functions
" _mutex_create_component
" _mutex_init
" _mutex_lock
" _mutex_try_lock
" _mutatr_init
" MUTEX_STRUCT
Description :
If tasks are waiting for the mutex, MQX removes the first one from the mutex queue and
puts the task in the task's ready queue.
CAUTION
Might put a task in the task's ready queue. [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • docucrime.xlx.pl