| /ast/src/lib/libast/astsa/ |
| H A D | aso.c | 27 asolock(unsigned int volatile* lock, unsigned int key, int type) argument 35 if (*lock != 0) 37 if (*lock != key) 39 *lock = 0; 43 if (*lock != key) 45 if (*lock != 0) 47 *lock = key; 52 *lock = key;
|
| /ast/src/lib/libast/aso/ |
| H A D | asolock.c | 33 asolock(unsigned int volatile* lock, unsigned int key, int type) 41 return *lock == 0 ? 0 : asocasint(lock, key, 0) == key ? 0 : -1; 43 return *lock == key ? 0 : asocasint(lock, 0, key) == 0 ? 0 : -1; 45 if (*lock == key) 49 for (k = 0; asocasint(lock, 0, key) != 0; ASOLOOP(k));
|
| H A D | aso-fcntl.c | 55 struct flock lock; 61 lock.l_type = F_WRLCK; 62 lock.l_whence = SEEK_SET; 63 lock.l_start = apl->size; 64 lock.l_len = sizeof(references); 65 if (fcntl(apl->fd, F_SETLKW, &lock) >= 0) 79 lock.l_type = F_UNLCK; 80 fcntl(apl->fd, F_SETLK, &lock); 133 lock.l_type = F_WRLCK; 134 lock [all...] |
| H A D | aso.c | 40 * lock methods and emulations by 175 * if type!=0 return lock method for type with name details 176 * else if name!=0 return lock method matching <name>[,<details>] 177 * else return the current lock method 227 * clean up lock method on exit 242 * initialize lock method 263 asoerror(ASO_EMETHOD, "%s method has no lock function", meth->name, 0, 0); 301 return asoerror(ASO_EHUNG, "spin lock possibly hung after 2^%u attempts", 0, 0, state.hung2); 310 lock(void* data, ssize_t k, void volatile* p) 315 asoerror(ASO_EMETHOD, "%s method lock faile [all...] |
| /ast/src/lib/libcoshell/ |
| H A D | cosync.c | 86 struct flock lock; local 98 lock.l_type = F_RDLCK; 99 lock.l_whence = 0; 100 lock.l_start = 0; 101 lock.l_len = 1; 102 if (!fcntl(fd, F_SETLK, &lock)) 104 lock.l_type = F_UNLCK; 105 fcntl(fd, F_SETLK, &lock);
|
| /ast/src/lib/libtaso/ |
| H A D | taso.c | 34 pthread_spinlock_t lock; member in struct:Aso_spin_s 44 pthread_spin_destroy(&spin->lock); 50 pthread_spin_init(&spin->lock, 0); 60 pthread_spin_unlock(&spin->lock); 62 pthread_spin_lock(&spin->lock); 74 pthread_mutex_t lock; member in struct:Aso_mutex_s 84 pthread_mutex_destroy(&mutex->lock); 90 pthread_mutex_init(&mutex->lock, 0); 100 pthread_mutex_unlock(&mutex->lock); 102 pthread_mutex_lock(&mutex->lock); [all...] |
| /ast/src/lib/libast/sfio/ |
| H A D | sfexcept.c | 38 reg int ev, local, lock; local 46 lock = f->mode&SF_LOCK; 53 if(local && lock) 61 if(local && lock) 117 if(lock) 125 if(lock)
|
| H A D | sfsync.c | 89 int local, rv, mode, lock; local 105 lock = origf->mode&SF_LOCK; 149 f->mode = SF_READ|SF_SYNCED|lock;
|
| H A D | vthread.h | 135 { _vtmtx_t lock; member in struct:_vtmutex_s
|
| /ast/src/lib/libast/cdt/ |
| H A D | dtopen.c | 160 return asolock(&dt->data->user.lock, key, ASO_LOCK); 162 return asolock(&dt->data->user.lock, key, ASO_UNLOCK); 163 else return asolock(&dt->data->user.lock, key, ASO_TRYLOCK);
|
| H A D | cdtlib.h | 60 { unsigned int lock; /* general dictionary lock */ member in struct:_dtdata_s 125 /* these macros lock/unlock dictionaries. DTRETURN substitutes for "return" */ 126 #define DTSETLOCK(dt) (((dt)->data->type&DT_SHARE) ? asolock(&(dt)->data->lock,1,ASO_SPINLOCK) : 0 ) 127 #define DTCLRLOCK(dt) (((dt)->data->type&DT_SHARE) ? asolock(&(dt)->data->lock,1,ASO_UNLOCK) : 0 )
|
| /ast/src/lib/libast/vmalloc/ |
| H A D | vmprivate.c | 260 { if(!locking) /* turn off lock */ 265 { if(!locking) /* turning off the lock */ 266 asolock(&vm->data->lock, 1, ASO_UNLOCK); 267 else asolock(&vm->data->lock, 1, ASO_SPINLOCK); 271 vm->data->lock = 0; 272 else vm->data->lock = 1;
|
| H A D | malloc.c | 389 { if(asocasint(&vm->data->lock, 0, 1) == 0) /* can free this now */ 391 vm->data->lock = 0; 427 Vmregion->data->lock = 1; 430 else if(asocasint(&Vmregion->data->lock, 0, 1) == 0 ) 441 { if(Region[p] && asocasint(&Region[p]->data->lock, 0, 1) == 0 ) 465 { vm->data->lock = 1; /* lock new region now */ 475 if(asocasint(&vm->data->lock, 0, 1) == 0) 502 { /**/ASSERT(vm->data->lock == 1); 503 vm->data->lock [all...] |
| H A D | vmstat.c | 49 if(!st) /* just checking lock state of region */ 50 return (vm ? vm : Vmregion)->data->lock;
|
| H A D | vmbest.c | 621 /**/ASSERT(local ? (vd->lock == 1) : 1 ); 729 /**/ASSERT(local ? (vd->lock == 1) : 1 ); 794 /**/ASSERT(local ? (vd->lock == 1) : 1 ); 857 /**/ASSERT(local ? (vd->lock == 1) : 1); 1354 0, /* lock */
|
| H A D | vmhdr.h | 190 /* lock and unlock regions during concurrent accesses */ 306 { unsigned int lock; /* lock status */ member in struct:_vmdata_s
|
| /ast/src/cmd/tests/cdt/ |
| H A D | trehash.c | 62 unsigned int lock; member in struct:_disc_s 87 if(asocasint(&dc->lock, 0, 1) == 0) /* get exclusive use first */ 98 asocasint(&dc->lock, 1, 0); /* release exclusive use */
|
| H A D | tsafehash.c | 62 unsigned int lock; member in struct:_disc_s 87 if(asocasint(&dc->lock, 0, 1) == 0) /* get exclusive use first */ 98 asocasint(&dc->lock, 1, 0); /* release exclusive use */
|
| H A D | tsafetree.c | 62 unsigned int lock; member in struct:_disc_s 87 if(asocasint(&dc->lock, 0, 1) == 0) /* get exclusive use first */ 98 asocasint(&dc->lock, 1, 0); /* release exclusive use */
|
| /ast/src/cmd/mailx/ |
| H A D | local.c | 184 * Make sure the lock doesn't hang -- NFS anyone? 203 if (state.var.lock) 207 if (!(r = strtol(state.var.lock, NiL, 10))) 226 note(0, "%s: file lock hung -- continuing without lock", name); 228 note(SYSTEM, "%s: continuing without lock", name);
|
| H A D | data.c | 408 "lock", &state.var.lock, 0, "5",0, 409 X("System mailbox lock hang seconds delay. If the lock hangs longer than this then it is ignored -- just for the NFS lock daemon."),
|
| H A D | mailx.h | 825 char* lock; member in struct:__anon136::__anon147
|
| /ast/src/lib/libtk/generic/ |
| H A D | tkSend.c | 229 TkDisplay *dispPtr, int lock)); 255 * If "lock" is set then the server will be locked. It is the 264 RegOpen(interp, dispPtr, lock) 271 int lock; /* Non-zero means lock the window server 291 if (lock && !sendDebug) {
|
| /ast/src/cmd/ksh93/sh/ |
| H A D | io.c | 1574 struct flock lock; local 1578 memset((void*)&lock,0,sizeof(lock)); 1579 lock.l_type = F_WRLCK; 1580 lock.l_whence = SEEK_SET; 1581 fcntl(fno,F_SETLKW,&lock); 1582 lock.l_type = F_UNLCK; 1608 fcntl(fno,F_SETLK,&lock);
|
| /ast/src/lib/libast/include/ |
| H A D | cdt.h | 78 { unsigned int lock; /* used by dtapplock */ member in struct:_dtuser_s
|