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:
Baohong Liu 2016-12-05 14:44:45 -08:00 committed by Anas Nashif
commit 891273dd1a

View file

@ -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);
}