diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2015-01-09 19:35:39 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2015-01-09 19:35:39 -0500 |
commit | 73d907a984439a26b77d6a88cc24d17745eab9a8 (patch) | |
tree | 71e1f34732d403fd4d6a87abde2eaa79d4c6ded3 | |
parent | 5383cc81a37a3d30524e9dae64afc0cd2afe23c2 (diff) |
-rw-r--r-- | src/pgm.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pgm.cpp b/src/pgm.cpp index ff6c2f9..5e30d32 100644 --- a/src/pgm.cpp +++ b/src/pgm.cpp | |||
@@ -70,7 +70,7 @@ typedef uint32_t pgm_fd_mask_t; | |||
70 | 70 | ||
71 | static __thread char errnostr_buf[80]; | 71 | static __thread char errnostr_buf[80]; |
72 | 72 | ||
73 | static inline pid_t gettid(void) | 73 | static inline pid_t pgm_gettid(void) |
74 | { | 74 | { |
75 | pid_t p = syscall(__NR_gettid); | 75 | pid_t p = syscall(__NR_gettid); |
76 | return p; | 76 | return p; |
@@ -3186,7 +3186,7 @@ int pgm_claim_node(node_t node, pid_t tid) | |||
3186 | goto out; | 3186 | goto out; |
3187 | } | 3187 | } |
3188 | 3188 | ||
3189 | n->owner = (tid == 0) ? gettid() : tid; | 3189 | n->owner = (tid == 0) ? pgm_gettid() : tid; |
3190 | } | 3190 | } |
3191 | pthread_mutex_unlock(&g->lock); | 3191 | pthread_mutex_unlock(&g->lock); |
3192 | 3192 | ||
@@ -3218,7 +3218,7 @@ int pgm_claim_any_node(graph_t graph, node_t* node, pid_t tid) | |||
3218 | { | 3218 | { |
3219 | node_id = i; | 3219 | node_id = i; |
3220 | n = &g->nodes[i]; | 3220 | n = &g->nodes[i]; |
3221 | n->owner = (tid == 0) ? gettid() : tid; | 3221 | n->owner = (tid == 0) ? pgm_gettid() : tid; |
3222 | break; | 3222 | break; |
3223 | } | 3223 | } |
3224 | } | 3224 | } |
@@ -3254,7 +3254,7 @@ int pgm_release_node(node_t node, pid_t tid) | |||
3254 | 3254 | ||
3255 | if(tid == 0) | 3255 | if(tid == 0) |
3256 | { | 3256 | { |
3257 | tid = gettid(); | 3257 | tid = pgm_gettid(); |
3258 | } | 3258 | } |
3259 | 3259 | ||
3260 | pthread_mutex_lock(&g->lock); | 3260 | pthread_mutex_lock(&g->lock); |