Release 4.7 drivers/staging/android/sw_sync.c
/*
* drivers/base/sw_sync.c
*
* 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.
*
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/export.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
#include <linux/syscalls.h>
#include <linux/uaccess.h>
#include "sw_sync.h"
struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)
{
struct sw_sync_pt *pt;
pt = (struct sw_sync_pt *)
sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt));
pt->value = value;
return (struct fence *)pt;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
erik gilling | erik gilling | 53 | 96.36% | 1 | 50.00% |
gustavo padovan | gustavo padovan | 2 | 3.64% | 1 | 50.00% |
| Total | 55 | 100.00% | 2 | 100.00% |
EXPORT_SYMBOL(sw_sync_pt_create);
static int sw_sync_fence_has_signaled(struct fence *fence)
{
struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;
struct sw_sync_timeline *obj =
(struct sw_sync_timeline *)fence_parent(fence);
return (pt->value > obj->value) ? 0 : 1;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
erik gilling | erik gilling | 37 | 69.81% | 1 | 25.00% |
gustavo padovan | gustavo padovan | 14 | 26.42% | 2 | 50.00% |
maarten lankhorst | maarten lankhorst | 2 | 3.77% | 1 | 25.00% |
| Total | 53 | 100.00% | 4 | 100.00% |
static void sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,
char *str, int size)
{
struct sw_sync_timeline *timeline =
(struct sw_sync_timeline *)sync_timeline;
snprintf(str, size, "%d", timeline->value);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
erik gilling | erik gilling | 43 | 100.00% | 2 | 100.00% |
| Total | 43 | 100.00% | 2 | 100.00% |
static void sw_sync_fence_value_str(struct fence *fence, char *str, int size)
{
struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;
snprintf(str, size, "%d", pt->value);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
erik gilling | erik gilling | 39 | 90.70% | 2 | 66.67% |
gustavo padovan | gustavo padovan | 4 | 9.30% | 1 | 33.33% |
| Total | 43 | 100.00% | 3 | 100.00% |
static struct sync_timeline_ops sw_sync_timeline_ops = {
.driver_name = "sw_sync",
.has_signaled = sw_sync_fence_has_signaled,
.timeline_value_str = sw_sync_timeline_value_str,
.fence_value_str = sw_sync_fence_value_str,
};
struct sw_sync_timeline *sw_sync_timeline_create(const char *name)
{
struct sw_sync_timeline *obj = (struct sw_sync_timeline *)
sync_timeline_create(&sw_sync_timeline_ops,
sizeof(struct sw_sync_timeline),
name);
return obj;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
erik gilling | erik gilling | 39 | 100.00% | 1 | 100.00% |
| Total | 39 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL(sw_sync_timeline_create);
void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)
{
obj->value += inc;
sync_timeline_signal(&obj->obj);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
erik gilling | erik gilling | 27 | 100.00% | 1 | 100.00% |
| Total | 27 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL(sw_sync_timeline_inc);
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
erik gilling | erik gilling | 299 | 90.61% | 5 | 50.00% |
gustavo padovan | gustavo padovan | 23 | 6.97% | 2 | 20.00% |
paul gortmaker | paul gortmaker | 5 | 1.52% | 1 | 10.00% |
maarten lankhorst | maarten lankhorst | 2 | 0.61% | 1 | 10.00% |
changlong xie | changlong xie | 1 | 0.30% | 1 | 10.00% |
| Total | 330 | 100.00% | 10 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.