Lines Matching defs:locked

85  *	getlkcnt()	Get the number of devices locked
88 * islocked() Determines if a device is locked
97 static int getlkcnt(void); /* Get the number of locked devices */
101 static char *islocked(char *); /* Determines if a device is locked */
260 int locked; /* TRUE if the file is locked */
267 /* Try to lock the file. If it's locked, wait and try again */
269 locked = FALSE;
271 while (noerror && !locked) {
272 if (fcntl(lkfilefd, F_SETLK, &lkinfo) != -1) locked = TRUE;
282 return (locked);
288 * This function extracts the number of currently-locked devices
294 * The number of devices locked or -1 if an error occurred.
351 /* Get the number of devices currently locked */
378 * getlocks() extracts the list of locked devices from the file
379 * containing that information. It returns the number of locked
380 * devices. If there are any locked devices, it allocates a buffer
381 * for the locked file information, saves that buffer address in
383 * locked if the function is successful.
411 /* Get the number of devices currently locked */
494 * key Key the device is being locked on
495 * alias The device alias being locked
630 * aliases to add to the list of locked devices
638 * lockcount Number of locks in the locked device structure
658 * use for the newly locked devices
711 * This function checks a device to see if it is locked. If it is
712 * not locked, it returns the device alias.
714 * A device is not locked if the device's alias does not appear in
715 * the device locks table, or the key on which the device was locked
724 * Returns a pointer to the device alias if it's not locked, or
725 * (char *) NULL if it's locked or some error occurred.
729 * int lockcount The number of devices that are locked
738 int locked; /* TRUE if device in locked list */
746 * is locked
749 locked = FALSE;
751 for (i = 0; !locked && (i < lockcount); i++) {
753 locked = TRUE;
757 if (locked) {
788 * EINVAL The device specified was not locked
789 * EPERM The device specified was locked but not on the
793 * locklist List of locked devices
794 * lockcount Number of entries in the locked-device list
804 int locked; /* TRUE if device currently locked */
828 /* Loop through the locked-device list looking for what we've got... */
829 locked = FALSE;
831 for (i = 0; !locked && (i < lockcount); i++) {
833 locked = TRUE;
840 /* If the device is locked ... */
841 if (locked) {
844 * If it's locked on the key we've been given, free it.
856 /* The device isn't locked. Set errno to EINVAL */
879 * from each of the lists, it updates the device-locked file and
1026 * int key The key that the device is locked on
1035 int key, /* Key device is locked on */
1074 * along with the key on which those devices were locked.