Lines Matching refs:Files
446 static FILESEM Files[FF_FS_LOCK]; /* Open object lock semaphores */ variable
944 if (Files[i].fs) { /* Existing entry */ in chk_lock()
945 if (Files[i].fs == dp->obj.fs && /* Check if the object matches with an open object */ in chk_lock()
946 Files[i].clu == dp->obj.sclust && in chk_lock()
947 Files[i].ofs == dp->dptr) break; in chk_lock()
957 return (acc != 0 || Files[i].ctr == 0x100) ? FR_LOCKED : FR_OK; in chk_lock()
965 for (i = 0; i < FF_FS_LOCK && Files[i].fs; i++) ; in enq_lock()
979 if (Files[i].fs == dp->obj.fs && in inc_lock()
980 Files[i].clu == dp->obj.sclust && in inc_lock()
981 Files[i].ofs == dp->dptr) break; in inc_lock()
985 for (i = 0; i < FF_FS_LOCK && Files[i].fs; i++) ; in inc_lock()
987 Files[i].fs = dp->obj.fs; in inc_lock()
988 Files[i].clu = dp->obj.sclust; in inc_lock()
989 Files[i].ofs = dp->dptr; in inc_lock()
990 Files[i].ctr = 0; in inc_lock()
993 if (acc >= 1 && Files[i].ctr) return 0; /* Access violation (int err) */ in inc_lock()
995 Files[i].ctr = acc ? 0x100 : Files[i].ctr + 1; /* Set semaphore value */ in inc_lock()
1010 n = Files[i].ctr; in dec_lock()
1013 Files[i].ctr = n; in dec_lock()
1014 if (n == 0) Files[i].fs = 0; /* Delete the entry if open count gets zero */ in dec_lock()
1030 if (Files[i].fs == fs) Files[i].fs = 0; in clear_lock()