56
57
#define LOGLEVEL_MODULE main
57
58
#include "loglevel_user.h"
59
#define LOCK_SHARED "S"
60
#define LOCK_EXCLUSIVE "X"
60
#define LOCK_SHARED "S"
61
#define LOCK_EXCLUSIVE "X"
61
62
#define FILELOCK_PROGRESS_DEARTH 8000 // Dearth of progress time in msec
62
63
#define FILELOCK_PROGRESS_SAMPLE 200 // Progress sampling time in msec
64
65
static char implicitReadToken;
67
#define PARSE_TABLE_UINT 0
68
#define PARSE_TABLE_STRING 1
70
typedef struct parse_table
68
79
*-----------------------------------------------------------------------------
72
* Have the calling thread sleep "for a while". The duration of the
73
* sleep is determined by the count that is passed in. Checks are
74
* also done for exceeding the maximum wait time.
83
* Have the calling thread sleep "for a while". The duration of the
84
* sleep is determined by the count that is passed in. Checks are
85
* also done for exceeding the maximum wait time.
78
* EAGAIN maximum sleep time exceeded
89
* EAGAIN maximum sleep time exceeded
83
94
*-----------------------------------------------------------------------------
173
184
*-----------------------------------------------------------------------------
186
* FileLockParseArgs --
188
* Parse the property list arguments of a lock file. The ParseTable
189
* contains names of properies that are interesting to the caller;
190
* only those values associated with the interesting names will be
191
* extracted, the others will be ignored.
194
* TRUE An error was detected
200
*-----------------------------------------------------------------------------
204
FileLockParseArgs(char *argv[], // IN:
205
uint32 argCount, // IN:
206
ParseTable *table, // IN:
207
uint32 tableSize) // IN:
209
uint32 argPos = 5; // The property list always starts with this argument
213
char *p = strchr(argv[argPos], '=');
215
/* Validate the "name=value" form */
216
if ((p == NULL) || (p == argv[argPos]) || (p[1] == '\0')) {
222
/* Unknown names are ignored without error */
223
for (i = 0; i < tableSize; i++) {
224
if (strcmp(argv[argPos], table[i].name) == 0) {
225
switch (table[i].type) {
226
case PARSE_TABLE_UINT:
227
if (sscanf(&p[1], "%u", (uint32 *) table[i].valuePtr) != 1) {
232
case PARSE_TABLE_STRING:
233
*((char **) table[i].valuePtr) = &p[1];
250
*-----------------------------------------------------------------------------
175
252
* FileLockMemberValues --
177
* Returns the values associated with lock directory file.
254
* Returns the values associated with lock directory file.
180
* 0 Valid lock file; values have been returned
181
* > 0 Lock file problem (errno); values have not been returned
257
* 0 Valid lock file; values have been returned
258
* > 0 Lock file problem (errno); values have not been returned
184
261
* The lock file may be deleted if it is invalid
193
272
uint32 requiredSize, // IN:
194
273
LockValues *memberValues) // OUT:
197
276
FILELOCK_FILE_HANDLE handle;
278
char *argv[FL_MAX_ARGS];
202
281
FileData fileData;
283
ParseTable table = { PARSE_TABLE_STRING,
285
(void *) &memberValues->locationChecksum
205
289
ASSERT(fileName);
207
path = Unicode_Join(lockDir, U(DIRSEPS), fileName, NULL);
291
path = Unicode_Join(lockDir, DIRSEPS, fileName, NULL);
209
293
err = FileLockOpenFile(path, O_RDONLY, &handle);
268
352
/* Extract and validate the lock file data. */
269
for (i = 0; i < 4; i++) {
270
argv[i] = strtok((i == 0) ? buffer : NULL, " ");
272
if (argv[i] == NULL) {
273
Warning(LGPFX" %s mandatory argument %u is missing!\n",
353
for (argc = 0; argc < FL_MAX_ARGS; argc++) {
354
argv[argc] = strtok((argc == 0) ? buffer : NULL, " ");
356
if (argv[argc] == NULL) {
361
if ((argc < 4) || ((argc == FL_MAX_ARGS) && (strtok(NULL, " ") != NULL))) {
366
* Lock file arguments are space separated. There is a minimum of 4
367
* arguments - machineID, executionID, Lamport number and lock type.
368
* The maximum number of arguments is FL_MAX_ARGS.
370
* The fifth argument, if present, is the payload or "[" if there is no
371
* payload and additional arguments are present. The additional arguments
372
* form a properly list - one or more "name=value" pairs.
374
* Here is picture of valid forms:
376
* 0 1 2 3 4 5 6 Comment
377
*-------------------------
378
* A B C D contents, no payload, no list entries
379
* A B C D [ contents, no payload, no list entries
380
* A B C D P contents, a payload, no list entries
381
* A B C D [ x contents, no payload, one list entry
382
* A B C D P x contents, a payload, one list entry
383
* A B C D [ x y contents, no payload, two list entries,
384
* A B C D P x y contents, a payload, two list entries
387
memberValues->locationChecksum = NULL;
390
memberValues->payload = NULL;
392
if (strcmp(argv[4], "[") == 0) {
393
memberValues->payload = NULL;
395
memberValues->payload = argv[4];
398
if (FileLockParseArgs(argv, argc - 5, &table, 1)) {
280
memberValues->payload = strtok(NULL, " ");
282
403
if (sscanf(argv[2], "%u", &memberValues->lamportNumber) != 1) {
283
Warning(LGPFX" %s Lamport number conversion error\n",
289
407
if ((strcmp(argv[3], LOCK_SHARED) != 0) &&
290
408
(strcmp(argv[3], LOCK_EXCLUSIVE) != 0)) {
291
Warning(LGPFX" %s unknown lock type '%s'\n", __FUNCTION__, argv[3]);
345
470
ASSERT(fileName);
347
472
/* The fileName must start with the ASCII character, 'M', 'D' or 'E' */
348
if (Unicode_FindSubstrInRange(U("MDE"), 0, -1, fileName, 0,
473
if (Unicode_FindSubstrInRange("MDE", 0, -1, fileName, 0,
349
474
1) == UNICODE_INDEX_NOT_FOUND) {
353
478
/* The fileName must contain 5 ASCII digits after the initial character */
354
479
for (i = 0; i < 5; i++) {
355
if (Unicode_FindSubstrInRange(U("0123456789"), 0, -1, fileName, i + 1,
480
if (Unicode_FindSubstrInRange("0123456789", 0, -1, fileName, i + 1,
356
481
1) == UNICODE_INDEX_NOT_FOUND) {
361
486
/* The fileName must terminate with the appropriate suffix string */
362
return Unicode_EndsWith(fileName, U(FILELOCK_SUFFIX));
487
return Unicode_EndsWith(fileName, FILELOCK_SUFFIX);
419
544
*-----------------------------------------------------------------------------
546
* FileLockLocationChecksum --
548
* Compute the location checksum of the argument path.
551
* The location checksum as dynamically allocated string.
556
*-----------------------------------------------------------------------------
560
FileLockLocationChecksum(ConstUnicode path) // IN:
567
Unicode value = Unicode_Duplicate(path);
569
/* Don't get fooled by mixed case; "normalize" */
573
char *p = (char *) path;
576
/* DBJ2 hash... good enough? */
578
hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
585
return Str_SafeAsprintf(NULL, "%u", hash);
590
*-----------------------------------------------------------------------------
421
592
* ScanDirectory --
423
* Call the specified function for each member file found in the
424
* specified directory.
594
* Call the specified function for each member file found in the
595
* specified directory.
431
* Anything that this not a valid locking file is deleted.
602
* Anything that this not a valid locking file is deleted.
433
604
*-----------------------------------------------------------------------------
451
622
Unicode *fileList = NULL;
623
char *myExecutionID = NULL;
624
char *locationChecksum = NULL;
455
numEntries = File_ListDirectory(lockDir, &fileList);
628
numEntries = FileListDirectoryRobust(lockDir, &fileList);
457
630
if (numEntries == -1) {
458
Log(LGPFX" %s: Could not read the directory '%s'.\n",
459
__FUNCTION__, UTF8(lockDir));
631
Log(LGPFX" %s: Could not read the directory '%s': %d\n",
632
__FUNCTION__, UTF8(lockDir), Err_Errno());
461
return EDOM; // out of my domain
634
return EDOM; // out of my domain
464
637
/* Pass 1: Validate entries and handle any 'D' entries */
539
715
/* Remove any stale locking files */
540
716
if (FileLockMachineIDMatch(myValues->machineID,
541
memberValues.machineID) &&
542
!FileLockValidOwner(memberValues.executionID,
543
memberValues.payload)) {
544
Log(LGPFX" %s discarding %s from %s'; invalid executionID.\n",
545
__FUNCTION__, UTF8(fileList[i]), UTF8(lockDir));
547
Unicode_Free(memberValues.memberName);
549
err = RemoveLockingFile(lockDir, fileList[i]);
717
memberValues.machineID)) {
718
char *dispose = NULL;
720
if (FileLockValidOwner(memberValues.executionID,
721
memberValues.payload)) {
722
/* If it's mine it better still be where I put it! */
723
if ((strcmp(myExecutionID, memberValues.executionID) == 0) &&
724
((memberValues.locationChecksum != NULL) &&
725
(strcmp(memberValues.locationChecksum,
726
locationChecksum) != 0))) {
727
dispose = "lock file has been moved.";
730
dispose = "invalid executionID.";
734
Log(LGPFX" %s discarding %s from %s': %s\n",
735
__FUNCTION__, UTF8(fileList[i]), UTF8(lockDir), dispose);
737
Unicode_Free(memberValues.memberName);
739
err = RemoveLockingFile(lockDir, fileList[i]);
557
748
ptr = &memberValues;
644
837
UnicodeIndex index;
646
ASSERT(Unicode_StartsWith(ptr->dirName, U("D")));
839
ASSERT(Unicode_StartsWith(ptr->dirName, "D"));
648
841
Log(LGPFX" %s discarding %s data from '%s'.\n",
649
842
__FUNCTION__, UTF8(ptr->dirName), UTF8(lockDir));
651
path = Unicode_Join(lockDir, U(DIRSEPS), ptr->dirName, NULL);
844
path = Unicode_Join(lockDir, DIRSEPS, ptr->dirName, NULL);
653
index = Unicode_FindLast(path, U("D"));
846
index = Unicode_FindLast(path, "D");
654
847
ASSERT(index != UNICODE_INDEX_NOT_FOUND);
656
temp = Unicode_Replace(path, index, 1, U("M"));
657
FileDeletion(temp, FALSE);
660
temp = Unicode_Replace(path, index, 1, U("E"));
661
FileDeletion(temp, FALSE);
664
FileRemoveDirectory(path);
849
temp = Unicode_Replace(path, index, 1, "M");
850
FileDeletionRobust(temp, FALSE);
853
temp = Unicode_Replace(path, index, 1, "E");
854
FileDeletionRobust(temp, FALSE);
857
FileRemoveDirectoryRobust(path);
666
859
Unicode_Free(path);
711
904
* FileUnlockIntrinsic --
713
* Release a lock on a file.
715
* The locker is required to identify themselves in a "universally
716
* unique" manner. This is done via two parameters:
719
* This a machine/hardware identifier string.
721
* The MAC address of a hardware Ethernet, a WWN of a
722
* hardware FibreChannel HBA, the UUID of an Infiniband HBA
723
* and a machine serial number (e.g. Macs) are all good
724
* candidates for a machine identifier.
727
* This is an string which differentiates one thread of
728
* execution from another within the host OS. In a
729
* non-threaded environment this can simply be some form
730
* of process identifier (e.g. getpid() on UNIXen or
731
* _getpid() on Windows). When a process makes use of
732
* threads AND more than one thread may perform locking
733
* this identifier must discriminate between all threads
734
* within the process.
736
* All of the ID strings must encode their respective information
737
* such that any OS may utilize the strings as part of a file name.
738
* Keep them short and, at a minimum, do not use ':', '/', '\', '.'
739
* and white space characters.
906
* Release a lock on a file.
748
915
*-----------------------------------------------------------------------------
752
FileUnlockIntrinsic(const char *machineID, // IN:
753
const char *executionID, // IN:
754
ConstUnicode pathName, // IN:
755
const void *lockToken) // IN:
919
FileUnlockIntrinsic(ConstUnicode pathName, // IN:
920
const void *lockToken) // IN:
761
924
ASSERT(pathName);
762
925
ASSERT(lockToken);
764
LOG(1, ("Releasing lock on %s (%s, %s).\n", UTF8(pathName),
765
machineID, executionID));
927
LOG(1, ("Requesting unlock on %s\n", UTF8(pathName)));
767
929
if (lockToken == &implicitReadToken) {
1037
1199
* CreateEntryDirectory --
1039
* Create an entry directory in the specified locking directory.
1201
* Create an entry directory in the specified locking directory.
1041
* Due to FileLock_UnlockFile() attempting to remove the locking
1042
* directory on an unlock operation (to "clean up" and remove the
1043
* locking directory when it is no longer needed), this routine
1044
* must carefully handle a number of race conditions to insure the
1045
* the locking directory exists and the entry directory is created
1203
* Due to FileLock_UnlockFile() attempting to remove the locking
1204
* directory on an unlock operation (to "clean up" and remove the
1205
* locking directory when it is no longer needed), this routine
1206
* must carefully handle a number of race conditions to insure the
1207
* the locking directory exists and the entry directory is created
1050
* > 0 failure (errno)
1212
* > 0 failure (errno)
1052
1214
* Side Effects:
1053
* On success returns the number identifying the entry directory and
1054
* the entry directory path name.
1215
* On success returns the number identifying the entry directory and
1216
* the entry directory path name.
1056
1218
*-----------------------------------------------------------------------------
1136
1298
*memberName = Unicode_Format("M%05u%s", randomNumber, FILELOCK_SUFFIX);
1138
1300
temp = Unicode_Format("D%05u%s", randomNumber, FILELOCK_SUFFIX);
1139
*entryDirectory = Unicode_Join(lockDir, U(DIRSEPS), temp, NULL);
1301
*entryDirectory = Unicode_Join(lockDir, DIRSEPS, temp, NULL);
1140
1302
Unicode_Free(temp);
1142
1304
temp = Unicode_Format("E%05u%s", randomNumber, FILELOCK_SUFFIX);
1143
*entryFilePath = Unicode_Join(lockDir, U(DIRSEPS), temp, NULL);
1305
*entryFilePath = Unicode_Join(lockDir, DIRSEPS, temp, NULL);
1144
1306
Unicode_Free(temp);
1146
*memberFilePath = Unicode_Join(lockDir, U(DIRSEPS), *memberName, NULL);
1308
*memberFilePath = Unicode_Join(lockDir, DIRSEPS, *memberName, NULL);
1148
1310
err = MakeDirectory(*entryDirectory);
1238
1400
ASSERT(entryFilePath);
1239
1401
ASSERT(memberFilePath);
1241
/* Populate the buffer with appropriate data */
1242
Str_Sprintf(buffer, sizeof buffer, "%s %s %u %s %s", myValues->machineID,
1243
myValues->executionID, myValues->lamportNumber,
1404
* Populate the buffer with appropriate data
1406
* Lock file arguments are space separated. There is a minimum of 4
1407
* arguments - machineID, executionID, Lamport number and lock type.
1408
* The maximum number of argument is FL_MAX_ARGS.
1410
* The fifth argument, if present, is the payload or "[" if there is no
1411
* payload and additional arguments are present. The additional arguments
1412
* form a properly list - one or more "name=value" pairs.
1415
Str_Sprintf(buffer, sizeof buffer, "%s %s %u %s %s lc=%s",
1416
myValues->machineID,
1417
myValues->executionID,
1418
myValues->lamportNumber,
1244
1419
myValues->lockType,
1245
myValues->payload == NULL ? "" : myValues->payload);
1420
myValues->payload == NULL ? "[" : myValues->payload,
1421
myValues->locationChecksum);
1247
1423
/* Attempt to write the data */
1248
1424
err = FileLockWriteFile(entryHandle, buffer, sizeof buffer, &len);
1282
1458
if (vmx86_debug) {
1283
1459
Log(LGPFX" %s FileLockFileType() of '%s': %s\n",
1284
1460
__FUNCTION__, UTF8(entryFilePath),
1285
strerror(FileAttributes(entryFilePath, NULL)));
1461
strerror(FileAttributesRobust(entryFilePath, NULL)));
1287
1463
Log(LGPFX" %s FileLockFileType() of '%s': %s\n",
1288
1464
__FUNCTION__, UTF8(memberFilePath),
1289
strerror(FileAttributes(memberFilePath, NULL)));
1465
strerror(FileAttributesRobust(memberFilePath, NULL)));
1301
1477
* FileLockIntrinsic --
1303
* Obtain a lock on a file; shared or exclusive access.
1305
* Each locker is required to identify themselves in a "universally
1306
* unique" manner. This is done via two parameters:
1309
* This a machine/hardware identifier string.
1311
* The MAC address of a hardware Ethernet, a WWN of a
1312
* hardware FibreChannel HBA, the UUID of an Infiniband HBA
1313
* and a machine serial number (e.g. Macs) are all good
1314
* candidates for a machine identifier.
1316
* The machineID is "univerally unique", discriminating
1317
* between all computational platforms.
1320
* This is an string which differentiates one thread of
1321
* execution from another within the host OS. In a
1322
* non-threaded environment this can simply be some form
1323
* of process identifier (e.g. getpid() on UNIXen or
1324
* _getpid() on Windows). When a process makes use of
1325
* threads AND more than one thread may perform locking
1326
* this identifier must discriminate between all threads
1327
* within the process.
1329
* All of the ID strings must encode their respective information
1330
* such that any OS may utilize the strings as part of a file name.
1331
* Keep them short and, at a minimum, do not use ':', '/', '\', '.'
1332
* and white space characters.
1334
* msecMaxWaitTime specifies the maximum amount of time, in
1335
* milliseconds, to wait for the lock before returning the "not
1336
* acquired" status. A value of FILELOCK_TRYLOCK_WAIT is the
1337
* equivalent of a "try lock" - the lock will be acquired only if
1338
* there is no contention. A value of FILELOCK_INFINITE_WAIT
1339
* specifies "waiting forever" to acquire the lock.
1479
* Obtain a lock on a file; shared or exclusive access.
1481
* msecMaxWaitTime specifies the maximum amount of time, in
1482
* milliseconds, to wait for the lock before returning the "not
1483
* acquired" status. A value of FILELOCK_TRYLOCK_WAIT is the
1484
* equivalent of a "try lock" - the lock will be acquired only if
1485
* there is no contention. A value of FILELOCK_INFINITE_WAIT
1486
* specifies "waiting forever" to acquire the lock.
1342
* NULL Lock not acquired. Check err.
1343
* err 0 Lock Timed Out
1345
* !NULL Lock Acquired. This is the "lockToken" for an unlock.
1489
* NULL Lock not acquired. Check err.
1490
* err 0 Lock Timed Out
1492
* !NULL Lock Acquired. This is the "lockToken" for an unlock.
1347
1494
* Side effects:
1350
1497
*-----------------------------------------------------------------------------
1354
FileLockIntrinsic(const char *machineID, // IN:
1355
const char *executionID, // IN:
1356
const char *payload, // IN:
1357
ConstUnicode pathName, // IN:
1358
Bool exclusivity, // IN:
1359
uint32 msecMaxWaitTime, // IN:
1501
FileLockIntrinsic(ConstUnicode pathName, // IN:
1502
Bool exclusivity, // IN:
1503
uint32 msecMaxWaitTime, // IN:
1504
const char *payload, // IN:
1362
1507
FILELOCK_FILE_HANDLE handle;
1363
1508
LockValues myValues;
1365
Unicode dirPath = NULL;
1510
Unicode lockDir = NULL;
1366
1511
Unicode entryFilePath = NULL;
1367
1512
Unicode memberFilePath = NULL;
1368
1513
Unicode entryDirectory = NULL;
1371
ASSERT(executionID);
1372
1515
ASSERT(pathName);
1518
/* Construct the locking directory path */
1519
lockDir = Unicode_Append(pathName, FILELOCK_SUFFIX);
1375
1521
/* establish our values */
1376
myValues.machineID = (char *) machineID;
1377
myValues.executionID = (char *) executionID;
1523
myValues.machineID = (char *) FileLockGetMachineID(); // don't free this!
1524
myValues.executionID = FileLockGetExecutionID(); // free this!
1378
1525
myValues.payload = (char *) payload;
1379
1526
myValues.lockType = exclusivity ? LOCK_EXCLUSIVE : LOCK_SHARED;
1380
1527
myValues.lamportNumber = 0;
1528
myValues.locationChecksum = FileLockLocationChecksum(lockDir); // free this!
1381
1529
myValues.waitTime = 0;
1382
1530
myValues.msecMaxWaitTime = msecMaxWaitTime;
1383
1531
myValues.memberName = NULL;
1386
1534
myValues.lockType, UTF8(pathName), myValues.machineID,
1387
1535
myValues.executionID, myValues.msecMaxWaitTime));
1389
/* Construct the locking directory path */
1390
dirPath = Unicode_Append(pathName, U(FILELOCK_SUFFIX));
1393
1538
* Attempt to create the locking and entry directories; obtain the
1394
1539
* entry and member path names.
1397
*err = CreateEntryDirectory(machineID, executionID, dirPath,
1542
*err = CreateEntryDirectory(myValues.machineID, myValues.executionID,
1398
1544
&entryDirectory, &entryFilePath,
1399
1545
&memberFilePath, &myValues.memberName);
1433
1579
if (*err != 0) {
1435
FileRemoveDirectory(entryDirectory);
1436
FileRemoveDirectory(dirPath);
1581
FileRemoveDirectoryRobust(entryDirectory);
1582
FileRemoveDirectoryRobust(lockDir);
1441
1587
/* what is max(Number[1]... Number[all lockers])? */
1442
*err = Scanner(dirPath, NumberScan, &myValues, FALSE);
1588
*err = Scanner(lockDir, NumberScan, &myValues, FALSE);
1444
1590
if (*err != 0) {
1446
1592
FileLockCloseFile(handle);
1447
FileDeletion(entryFilePath, FALSE);
1448
FileRemoveDirectory(entryDirectory);
1449
FileRemoveDirectory(dirPath);
1593
FileDeletionRobust(entryFilePath, FALSE);
1594
FileRemoveDirectoryRobust(entryDirectory);
1595
FileRemoveDirectoryRobust(lockDir);
1458
1604
*err = CreateMemberFile(handle, &myValues, entryFilePath, memberFilePath);
1460
1606
/* Remove entry directory; it has done its job */
1461
FileRemoveDirectory(entryDirectory);
1607
FileRemoveDirectoryRobust(entryDirectory);
1463
1609
if (*err != 0) {
1465
FileDeletion(entryFilePath, FALSE);
1466
FileDeletion(memberFilePath, FALSE);
1467
FileRemoveDirectory(dirPath);
1611
FileDeletionRobust(entryFilePath, FALSE);
1612
FileDeletionRobust(memberFilePath, FALSE);
1613
FileRemoveDirectoryRobust(lockDir);
1472
1618
/* Attempt to acquire the lock */
1473
*err = Scanner(dirPath, WaitForPossession, &myValues, TRUE);
1619
*err = Scanner(lockDir, WaitForPossession, &myValues, TRUE);
1475
1621
switch (*err) {
1544
1692
* FileLockHackVMX --
1546
* The VMX file delete primitive.
1694
* The VMX file delete primitive.
1552
1700
* Side effects:
1553
1701
* Changes the host file system.
1556
* THIS IS A HORRIBLE HACK AND NEEDS TO BE REMOVED ASAP!!!
1704
* THIS IS A HORRIBLE HACK AND NEEDS TO BE REMOVED ASAP!!!
1558
1706
*----------------------------------------------------------------------
1562
FileLockHackVMX(const char *machineID, // IN:
1563
const char *executionID, // IN:
1564
ConstUnicode pathName) // IN:
1710
FileLockHackVMX(ConstUnicode pathName) // IN:
1567
1713
LockValues myValues;
1569
Unicode dirPath = NULL;
1715
Unicode lockDir = NULL;
1570
1716
Unicode entryFilePath = NULL;
1571
1717
Unicode memberFilePath = NULL;
1572
1718
Unicode entryDirectory = NULL;
1574
1720
ASSERT(pathName);
1722
/* first the locking directory path name */
1723
lockDir = Unicode_Append(pathName, FILELOCK_SUFFIX);
1725
/* establish our values */
1726
myValues.machineID = (char *) FileLockGetMachineID(); // don't free this!
1727
myValues.executionID = FileLockGetExecutionID(); // free this!
1728
myValues.locationChecksum = FileLockLocationChecksum(lockDir); // free this!
1729
myValues.lamportNumber = 0;
1730
myValues.memberName = NULL;
1576
1732
LOG(1, ("%s on %s (%s, %s).\n", __FUNCTION__, UTF8(pathName),
1577
machineID, executionID));
1579
/* establish our values */
1580
myValues.machineID = (char *) machineID;
1581
myValues.executionID = (char *) executionID;
1582
myValues.lamportNumber = 0;
1583
myValues.memberName = NULL;
1585
/* first the locking directory path name */
1586
dirPath = Unicode_Append(pathName, U(FILELOCK_SUFFIX));
1588
err = CreateEntryDirectory(machineID, executionID, dirPath,
1733
myValues.machineID, myValues.executionID));
1735
err = CreateEntryDirectory(myValues.machineID, myValues.executionID,
1589
1737
&entryDirectory, &entryFilePath,
1590
1738
&memberFilePath, &myValues.memberName);