device: add deprecated attribute to device sync APIs
Device_sync_call related APIs and typedef are actually wrappers for kernel semaphores. These APIs and typedef will be deprecated. Let's add deprecated attribute to give deprecation warning. Jira: ZEP-1411 Change-Id: Ia07557cc81bd9ee8e41f2e17be4607c4bd6d23bd Signed-off-by: baohong Liu <baohong.liu@intel.com>
This commit is contained in:
parent
362fb9e62b
commit
891273dd1a
1 changed files with 5 additions and 4 deletions
|
@ -639,7 +639,7 @@ int device_busy_check(struct device *chk_dev);
|
|||
typedef struct {
|
||||
/** Nanokernel semaphore used for fiber context */
|
||||
struct k_sem f_sem;
|
||||
} device_sync_call_t;
|
||||
} __deprecated device_sync_call_t;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -647,7 +647,7 @@ typedef struct {
|
|||
*
|
||||
* @param sync A pointer to a valid device_sync_call_t
|
||||
*/
|
||||
static inline void device_sync_call_init(device_sync_call_t *sync)
|
||||
static inline void __deprecated device_sync_call_init(device_sync_call_t *sync)
|
||||
{
|
||||
k_sem_init(&sync->f_sem, 0, UINT_MAX);
|
||||
}
|
||||
|
@ -658,7 +658,7 @@ static inline void device_sync_call_init(device_sync_call_t *sync)
|
|||
*
|
||||
* @param sync A pointer to a valid device_sync_call_t
|
||||
*/
|
||||
static inline void device_sync_call_wait(device_sync_call_t *sync)
|
||||
static inline void __deprecated device_sync_call_wait(device_sync_call_t *sync)
|
||||
{
|
||||
k_sem_take(&sync->f_sem, K_FOREVER);
|
||||
}
|
||||
|
@ -669,7 +669,8 @@ static inline void device_sync_call_wait(device_sync_call_t *sync)
|
|||
*
|
||||
* @param sync A pointer to a valid device_sync_call_t
|
||||
*/
|
||||
static inline void device_sync_call_complete(device_sync_call_t *sync)
|
||||
static inline void __deprecated
|
||||
device_sync_call_complete(device_sync_call_t *sync)
|
||||
{
|
||||
k_sem_give(&sync->f_sem);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue