Files
Shadab Naseem 18aeb13f53 include: Add snapshot of sync and sw_sync headers in msm-4.9
Add snapshot of sync and sw_sync headers in msm-4.9 in linux and
uapi folder from msm-3.18 'commit f8b6819d0432 ("msm: ipa:
Fix to handle NULL pointer dereference")'.

Change-Id: Ic61c5e5cefbc6122b9b78117c61131929359283d
Signed-off-by: Shadab Naseem <snaseem@codeaurora.org>
2018-03-19 14:33:58 +05:30

60 lines
1.4 KiB
C

/*
* include/linux/sw_sync.h
*
* Copyright (C) 2012 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
*/
#ifndef _LINUX_SW_SYNC_H
#define _LINUX_SW_SYNC_H
#include <linux/types.h>
#include <linux/kconfig.h>
#include <linux/sync.h>
#include <uapi/linux/sw_sync.h>
struct sw_sync_timeline {
struct sync_timeline obj;
u32 value;
};
struct sw_sync_pt {
struct sync_pt pt;
u32 value;
};
#if IS_ENABLED(CONFIG_SW_SYNC)
struct sw_sync_timeline *sw_sync_timeline_create(const char *name);
void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc);
struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value);
#else
static inline struct sw_sync_timeline *sw_sync_timeline_create(const char *name)
{
return NULL;
}
static inline void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)
{
}
static inline struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj,
u32 value)
{
return NULL;
}
#endif /* IS_ENABLED(CONFIG_SW_SYNC) */
#endif /* _LINUX_SW_SYNC_H */