Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363259
b: refs/heads/master
c: 97a8484
h: refs/heads/master
i:
  363257: c4e3414
  363255: 6872bca
v: v3
  • Loading branch information
Erik Gilling authored and Greg Kroah-Hartman committed Mar 4, 2013
1 parent 5414a67 commit 4404111
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d1906e61dda982070e3910a04d9cce050f7f1a4
refs/heads/master: 97a84843ac4a1b81c36ccf35ee26cd19c5b8d873
5 changes: 5 additions & 0 deletions trunk/drivers/staging/android/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,17 @@ void sync_pt_free(struct sync_pt *pt)
/* call with pt->parent->active_list_lock held */
static int _sync_pt_has_signaled(struct sync_pt *pt)
{
int old_status = pt->status;

if (!pt->status)
pt->status = pt->parent->ops->has_signaled(pt);

if (!pt->status && pt->parent->destroyed)
pt->status = -ENOENT;

if (pt->status != old_status)
pt->timestamp = ktime_get();

return pt->status;
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/staging/android/sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/types.h>
#ifdef __KERNEL__

#include <linux/ktime.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
Expand Down Expand Up @@ -90,6 +91,8 @@ struct sync_timeline {
* @fence: sync_fence to which the sync_pt belongs
* @pt_list: membership in sync_fence.pt_list_head
* @status: 1: signaled, 0:active, <0: error
* @timestamp: time which sync_pt status transitioned from active to
* singaled or error.
*/
struct sync_pt {
struct sync_timeline *parent;
Expand All @@ -102,6 +105,8 @@ struct sync_pt {

/* protected by parent->active_list_lock */
int status;

ktime_t timestamp;
};

/**
Expand Down

0 comments on commit 4404111

Please sign in to comment.