acquire a lock for exclusive access to this graph's data
| 61 | |
| 62 | // acquire a lock for exclusive access to this graph's data |
| 63 | void Graph_AcquireWriteLock(Graph *g) { |
| 64 | ASSERT(g != NULL); |
| 65 | ASSERT(g->_writelocked == false); |
| 66 | |
| 67 | pthread_rwlock_wrlock(&g->_rwlock); |
| 68 | g->_writelocked = true; |
| 69 | } |
| 70 | |
| 71 | // Release the held lock |
| 72 | void Graph_ReleaseLock |
no outgoing calls