Changeset 1198 in svn for trunk/xcache/xc_lock.c
- Timestamp:
- 2012-12-17T06:11:34Z (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache/xc_lock.c
r1186 r1198 39 39 # define LCK_NB 0 40 40 static inline int dolock(xc_lock_t *lck, int type) /* {{{ */ 41 { 41 { 42 42 int ret; 43 43 struct flock lock; … … 70 70 # define LCK_NB LOCKFILE_FAIL_IMMEDIATELY 71 71 static inline int dolock(xc_lock_t *lck, int type) /* {{{ */ 72 { 72 { 73 73 static OVERLAPPED offset = {0, 0, 0, 0, NULL}; 74 74 … … 137 137 /* }}} */ 138 138 void xc_fcntl_destroy(xc_lock_t *lck) /* {{{ */ 139 { 139 { 140 140 close(lck->fd); 141 141 #ifdef __CYGWIN__ … … 147 147 /* }}} */ 148 148 void xc_fcntl_lock(xc_lock_t *lck) /* {{{ */ 149 { 149 { 150 150 if (dolock(lck, LCK_WR) < 0) { 151 151 zend_error(E_ERROR, "xc_fcntl_lock failed errno:%d", errno); … … 154 154 /* }}} */ 155 155 void xc_fcntl_rdlock(xc_lock_t *lck) /* {{{ */ 156 { 156 { 157 157 if (dolock(lck, LCK_RD) < 0) { 158 158 zend_error(E_ERROR, "xc_fcntl_lock failed errno:%d", errno); … … 161 161 /* }}} */ 162 162 void xc_fcntl_unlock(xc_lock_t *lck) /* {{{ */ 163 { 163 { 164 164 if (dolock(lck, LCK_UN) < 0) { 165 165 zend_error(E_ERROR, "xc_fcntl_unlock failed errno:%d", errno);
Note: See TracChangeset
for help on using the changeset viewer.