|
WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
|
#include <asm/atomic.h>#include <asm/param.h>#include <linux/version.h>#include <linux/interrupt.h>#include <linux/wait.h>#include <linux/proc_fs.h>#include <linux/sched.h>#include <linux/module.h>#include <linux/ktime.h>#include <linux/stacktrace.h>#include "linux/time.h"#include "linux/timex.h"#include "linux/rtc.h"#include "oal_time.h"#include "oal_spinlock.h"#include "oal_schedule_hcm.h"
结构体 | |
| struct | _oal_wakelock_stru_ |
宏定义 | |
| #define | OAL_DECLARE_TASK DECLARE_TASKLET |
| #define | OAL_WAIT_EVENT_INTERRUPTIBLE_TIMEOUT(_st_wq, _condition, _timeout) wait_event_interruptible_timeout(_st_wq, _condition, _timeout) |
| #define | OAL_INIT_COMPLETION(_my_completion) init_completion(_my_completion) |
| #define | OAL_COMPLETE(_my_completion) complete(_my_completion) |
| #define | oal_in_interrupt() in_interrupt() |
| #define | oal_module_license(_license_name) MODULE_LICENSE(_license_name) |
| #define | OAL_S_IRUGO S_IRUGO |
| #define | oal_module_init(_module_name) module_init(_module_name) |
| #define | oal_module_exit(_module_name) module_exit(_module_name) |
| #define | oal_module_symbol(_symbol) EXPORT_SYMBOL(_symbol) |
| #define | oal_smp_call_function_single(core, task, info, wait) smp_call_function_single(core, task, info, wait) |
| #define | OAL_IS_ERR_OR_NULL(ptr) (!(ptr) || IS_ERR(ptr)) |
类型定义 | |
| typedef struct _oal_wakelock_stru_ | oal_wakelock_stru |
| typedef atomic_t | oal_atomic |
| typedef osal_u32(* | oal_irqlocked_func) (osal_void *) |
| typedef rwlock_t | oal_rwlock_stru |
| typedef struct timer_list | oal_timer_list_stru |
| typedef struct tasklet_struct | oal_tasklet_stru |
| typedef osal_void(* | oal_defer_func) (osal_ulong) |
| typedef osal_u32(* | oal_module_func_t) (osal_void) |
| typedef struct proc_dir_entry | oal_proc_dir_entry_stru |
| typedef struct mutex | oal_mutex_stru |
| typedef struct completion | oal_completion |
| #define OAL_COMPLETE | ( | _my_completion | ) | complete(_my_completion) |
| #define OAL_DECLARE_TASK DECLARE_TASKLET |
| #define oal_in_interrupt | ( | ) | in_interrupt() |
| #define OAL_INIT_COMPLETION | ( | _my_completion | ) | init_completion(_my_completion) |
| #define OAL_IS_ERR_OR_NULL | ( | ptr | ) | (!(ptr) || IS_ERR(ptr)) |
| #define oal_module_exit | ( | _module_name | ) | module_exit(_module_name) |
| #define oal_module_init | ( | _module_name | ) | module_init(_module_name) |
| #define oal_module_license | ( | _license_name | ) | MODULE_LICENSE(_license_name) |
| #define oal_module_symbol | ( | _symbol | ) | EXPORT_SYMBOL(_symbol) |
| #define OAL_S_IRUGO S_IRUGO |
| #define oal_smp_call_function_single | ( | core, | |
| task, | |||
| info, | |||
| wait | |||
| ) | smp_call_function_single(core, task, info, wait) |
| #define OAL_WAIT_EVENT_INTERRUPTIBLE_TIMEOUT | ( | _st_wq, | |
| _condition, | |||
| _timeout | |||
| ) | wait_event_interruptible_timeout(_st_wq, _condition, _timeout) |
wait_event_interruptible_timeout - sleep until a condition gets true or a timeout elapses @_wq: the waitqueue to wait on @_condition: a C expression for the event to wait for @_timeout: timeout, in jiffies
The process is put to sleep (TASK_INTERRUPTIBLE) until the @condition evaluates to true or a signal is received. The @condition is checked each time the waitqueue @wq is woken up.
wake_up() has to be called after changing any variable that could change the result of the wait condition.
The function returns 0 if the @timeout elapsed, -ERESTARTSYS if it was interrupted by a signal, and the remaining jiffies otherwise if the condition evaluated to true before the timeout elapsed.
| typedef atomic_t oal_atomic |
| typedef struct completion oal_completion |
| typedef osal_void(* oal_defer_func) (osal_ulong) |
| typedef struct mutex oal_mutex_stru |
| typedef struct proc_dir_entry oal_proc_dir_entry_stru |
| typedef rwlock_t oal_rwlock_stru |
| typedef struct tasklet_struct oal_tasklet_stru |
| typedef struct timer_list oal_timer_list_stru |
| typedef struct _oal_wakelock_stru_ oal_wakelock_stru |
| OAL_STATIC OAL_INLINE oal_proc_dir_entry_stru * oal_create_proc_entry | ( | const osal_s8 * | pc_name, |
| osal_u16 | mode, | ||
| oal_proc_dir_entry_stru * | parent | ||
| ) |
| OAL_STATIC OAL_INLINE void oal_remove_proc_entry | ( | const osal_s8 * | pc_name, |
| oal_proc_dir_entry_stru * | parent | ||
| ) |
| OAL_STATIC OAL_INLINE osal_void oal_rw_lock_init | ( | oal_rwlock_stru * | lock | ) |
| OAL_STATIC OAL_INLINE osal_void oal_rw_lock_read_lock | ( | oal_rwlock_stru * | lock | ) |
| OAL_STATIC OAL_INLINE osal_void oal_rw_lock_read_unlock | ( | oal_rwlock_stru * | lock | ) |
| OAL_STATIC OAL_INLINE osal_void oal_rw_lock_write_lock | ( | oal_rwlock_stru * | lock | ) |
| OAL_STATIC OAL_INLINE osal_void oal_rw_lock_write_unlock | ( | oal_rwlock_stru * | lock | ) |
| OAL_STATIC OAL_INLINE osal_void oal_task_init | ( | oal_tasklet_stru * | task, |
| oal_defer_func | p_func, | ||
| osal_ulong | args | ||
| ) |
| OAL_STATIC OAL_INLINE osal_ulong oal_task_is_scheduled | ( | oal_tasklet_stru * | task | ) |
| OAL_STATIC OAL_INLINE osal_void oal_task_kill | ( | oal_tasklet_stru * | task | ) |
| OAL_STATIC OAL_INLINE osal_void oal_task_sched | ( | oal_tasklet_stru * | task | ) |
| OAL_STATIC OAL_INLINE osal_slong oal_wait_for_completion_interruptible_timeout | ( | oal_completion * | completion, |
| osal_ulong | timeout | ||
| ) |
| OAL_STATIC OAL_INLINE osal_u32 oal_wait_for_completion_timeout | ( | oal_completion * | completion, |
| osal_u32 | timeout | ||
| ) |
| OAL_STATIC OAL_INLINE void oal_wake_lock | ( | oal_wakelock_stru * | wakelock | ) |
| OAL_STATIC OAL_INLINE osal_void oal_wake_lock_exit | ( | oal_wakelock_stru * | wakelock | ) |
| OAL_STATIC OAL_INLINE osal_void oal_wake_lock_init | ( | oal_wakelock_stru * | wakelock, |
| char * | name | ||
| ) |
| OAL_STATIC OAL_INLINE void oal_wake_unlock | ( | oal_wakelock_stru * | wakelock | ) |