/titanic_41/usr/src/lib/libzonecfg/common/ |
H A D | getzoneent.c | 201 int lock_fd; in lock_index_file() local 213 lock_fd = open(path, O_CREAT|O_RDWR, 0644); in lock_index_file() 214 if (lock_fd == -1) in lock_index_file() 222 if (fcntl(lock_fd, F_SETLKW, &lock) == -1) { in lock_index_file() 223 (void) close(lock_fd); in lock_index_file() 227 return (lock_fd); in lock_index_file() 231 unlock_index_file(int lock_fd) in unlock_index_file() argument 240 if (fcntl(lock_fd, F_SETLK, &lock) == -1) in unlock_index_file() 243 if (close(lock_fd) == -1) in unlock_index_file() 273 int tmp_file_desc, lock_fd, err; in putzoneent() local [all …]
|
/titanic_41/usr/src/lib/libdladm/common/ |
H A D | libdlflow.c | 83 int lock_fd; in i_dladm_flow_lock_db() local 86 if ((lock_fd = open(DLADM_FLOW_DB_LOCK, O_RDWR | O_CREAT | O_TRUNC, in i_dladm_flow_lock_db() 95 if (fcntl(lock_fd, F_SETLKW, &lock) < 0) { in i_dladm_flow_lock_db() 96 (void) close(lock_fd); in i_dladm_flow_lock_db() 100 return (lock_fd); in i_dladm_flow_lock_db() 326 int nfd, fn_rc, lock_fd; in i_dladm_flow_walk_rw_db() local 346 if ((lock_fd = i_dladm_flow_lock_db(F_WRLCK)) < 0) in i_dladm_flow_walk_rw_db() 350 i_dladm_flow_unlock_db(lock_fd); in i_dladm_flow_walk_rw_db() 357 i_dladm_flow_unlock_db(lock_fd); in i_dladm_flow_walk_rw_db() 365 i_dladm_flow_unlock_db(lock_fd); in i_dladm_flow_walk_rw_db() [all …]
|
H A D | libdladm.c | 580 int lock_fd; in i_dladm_lock_db() local 583 if ((lock_fd = open(lock_file, O_RDWR | O_CREAT | O_TRUNC, in i_dladm_lock_db() 592 if (fcntl(lock_fd, F_SETLKW, &lock) < 0) { in i_dladm_lock_db() 595 (void) close(lock_fd); in i_dladm_lock_db() 600 return (lock_fd); in i_dladm_lock_db() 717 int nfd, lock_fd; in i_dladm_rw_db() local 730 if ((lock_fd = i_dladm_lock_db in i_dladm_rw_db() 738 i_dladm_unlock_db(lock, lock_fd); in i_dladm_rw_db() 751 i_dladm_unlock_db(lock, lock_fd); in i_dladm_rw_db() 759 i_dladm_unlock_db(lock, lock_fd); in i_dladm_rw_db() [all …]
|
/titanic_41/usr/src/cmd/svr4pkg/libinst/ |
H A D | lockinst.c | 76 static int lock_fd, lock_is_applied; variable 194 lock_fd = fd; in lockinst() 256 (void) wrlockdata(lock_fd, lock_pid, lock_name, lock_pkg, place, in lockupd() 268 (void) wrlockdata(lock_fd, lock_pid, lock_name, lock_pkg, in unlockinst() 276 if (close(lock_fd) != -1) in unlockinst()
|
H A D | ocfile.c | 102 static int lock_fd; /* fd of LOCKFILE. */ variable 568 lock_fd = open(lockpath, O_RDWR|O_CREAT|O_TRUNC|O_EXCL, 0644); in pkgWlock() 569 if (lock_fd < 0) { in pkgWlock() 574 (void) fchmod(lock_fd, 0644); /* force perms. */ in pkgWlock() 577 if ((lock_fd = open(lockpath, O_RDWR)) == -1) { in pkgWlock() 588 if (lockf(lock_fd, F_LOCK, 0)) { in pkgWlock() 633 if (close(lock_fd)) in pkgWunlock()
|
/titanic_41/usr/src/cmd/sendmail/libsmdb/ |
H A D | smdb.c | 318 smdb_lock_file(lock_fd, db_name, mode, sff, extension) in smdb_lock_file() argument 319 int *lock_fd; in smdb_lock_file() 333 *lock_fd = safeopen(file_name, mode & ~O_TRUNC, DBMMODE, sff); 334 if (*lock_fd < 0) 352 smdb_unlock_file(lock_fd) in smdb_unlock_file() argument 353 int lock_fd; in smdb_unlock_file() 357 result = close(lock_fd);
|
H A D | smdb1.c | 461 int lock_fd; local 492 lock_fd = -1; 493 result = smdb_lock_file(&lock_fd, db_name, mode, sff, 510 (void) smdb_unlock_file(lock_fd); 515 db1->smdb1_lock_fd = lock_fd;
|
H A D | smndbm.c | 499 int lock_fd; local 527 lock_fd = -1; 528 result = smdb_lock_file(&lock_fd, db_name, mode, sff, 542 (void) close(lock_fd); 562 db->smndbm_lock_fd = lock_fd;
|
H A D | smdb2.c | 579 int lock_fd; local 605 lock_fd = -1; 611 result = smdb_lock_file(&lock_fd, db_name, mode, sff, 626 smdb_unlock_file(lock_fd); 631 db2->smdb2_lock_fd = lock_fd;
|
/titanic_41/usr/src/cmd/lp/cmd/lpsched/ |
H A D | lpsched.c | 46 int lock_fd = -1; variable 211 if ((lock_fd = open_locked(Lp_Schedlock, "a", 0664)) < 0) in startup() 216 close(lock_fd); in startup() 223 if ((lock_fd = open_locked(Lp_Schedlock, "w", 0664)) < 0) in startup() 282 (void) close(lock_fd); in lpshut()
|
H A D | lpsched.h | 397 extern int lock_fd;
|
H A D | exec.c | 83 (void)Fcntl (lock_fd, F_SETLK, &l); in relock()
|
/titanic_41/usr/src/cmd/allocate/ |
H A D | allocate3.c | 1000 char *zonename, int *lock_fd) in _deallocate_dev() argument 1098 if ((*lock_fd = lock_dev(fname, &stat_buf)) == -1) { in _deallocate_dev() 1150 int *lock_fd) in _allocate_dev() argument 1241 zonename, lock_fd)) { in _allocate_dev() 1256 if ((*lock_fd = lock_dev(fname, &stat_buf)) == -1) { in _allocate_dev() 1357 int lock_fd = -1; in allocate() local 1379 &lock_fd); in allocate() 1404 error = _allocate_dev(optflag, uid, da, zonename, &lock_fd); in allocate() 1417 if (lock_fd != -1) in allocate() 1418 (void) close(lock_fd); in allocate() [all …]
|
/titanic_41/usr/src/cmd/syseventadm/ |
H A D | syseventadm.c | 87 static int lock_fd; variable 229 lock_fd = open(lock_file, O_CREAT|O_RDWR, 0644); in enter_lock() 230 if (lock_fd < 0) { in enter_lock() 242 if (fcntl(lock_fd, F_SETLKW, &lock) == -1) { in enter_lock() 245 (void) close(lock_fd); in enter_lock() 263 if (fcntl(lock_fd, F_SETLK, &lock) == -1) { in exit_lock() 268 if (close(lock_fd) == -1) { in exit_lock()
|
/titanic_41/usr/src/cmd/syseventd/modules/sysevent_conf_mod/ |
H A D | sysevent_conf_mod.c | 809 int lock_fd; in enter_lock() local 812 lock_fd = open(lock_file, O_CREAT|O_RDWR, 0644); in enter_lock() 813 if (lock_fd < 0) { in enter_lock() 825 if (fcntl(lock_fd, F_SETLKW, &lock) == -1) { in enter_lock() 828 (void) close(lock_fd); in enter_lock() 834 return (lock_fd); in enter_lock() 839 exit_lock(int lock_fd, char *lock_file) in exit_lock() argument 848 if (fcntl(lock_fd, F_SETLK, &lock) == -1) { in exit_lock() 853 if (close(lock_fd) == -1) { in exit_lock() 2156 int lock_fd; in slm_init() local [all …]
|
H A D | sysevent_conf_mod.h | 146 static void exit_lock(int lock_fd, char *lock_file);
|
/titanic_41/usr/src/cmd/krb5/slave/ |
H A D | kpropd.c | 530 int lock_fd; local 658 lock_fd = open(temp_file_name, O_RDWR|O_CREAT, 0600); 660 retval = krb5_lock_file(doit_context, lock_fd, 683 retval = krb5_lock_file(doit_context, lock_fd, KRB5_LOCKMODE_SHARED); 691 retval = krb5_lock_file(doit_context, lock_fd, KRB5_LOCKMODE_UNLOCK); 697 (void)close(lock_fd);
|
/titanic_41/usr/src/lib/libdevinfo/ |
H A D | devinfo_devlink.c | 410 proto.lock_fd = -1; in handle_alloc() 1092 assert(hdp->lock_fd == -1); in handle_free() 3084 assert(hdp->lock_fd < 0); in enter_db_lock() 3143 hdp->lock_fd = fd; in enter_db_lock() 3165 if (hdp->lock_fd < 0) { in exit_db_lock() 3176 if (fcntl(hdp->lock_fd, F_SETLK, &unlock) == -1) { in exit_db_lock() 3181 (void) close(hdp->lock_fd); in exit_db_lock() 3183 hdp->lock_fd = -1; in exit_db_lock()
|
H A D | devinfo_devlink.h | 147 int lock_fd; /* lock file for updates */ member
|