Ticket #53630: file-lock-removal.diff
File file-lock-removal.diff, 2.7 KB (added by aaschwanden (Andy Aschwanden), 8 years ago) |
---|
-
src/H5private.h
812 812 * fcntl(2), then fall back to a function that always fails if 813 813 * it is not present at all. 814 814 */ 815 #if defined(H5_HAVE_FLOCK) 816 #define HDflock(F,L) flock(F,L) 817 #elif defined(H5_HAVE_FCNTL) 818 #define HDflock(F,L) Pflock(F,L) 819 #else 820 #define HDflock(F,L) Nflock(F,L) 821 #endif /* H5_HAVE_FLOCK */ 815 /* TEMPORARY SOURCE PATCH for HDF5 1.10.0-patch1 816 * 817 * Define the no-op function as flock to disable file 818 * locking. 819 */ 820 #define HDflock(F,L) Nflock(F,L) 822 821 #endif /* HDflock */ 823 822 #ifndef HDfloor 824 823 #define HDfloor(X) floor(X) -
src/H5system.c
638 638 * Purpose: Wrapper function for systems where no file locking is 639 639 * available. 640 640 * 641 * Return: Failure: -1 (always fails)641 * Return: Success: 1 (always passes) 642 642 * 643 643 *------------------------------------------------------------------------- 644 644 */ 645 645 int H5_ATTR_CONST 646 646 Nflock(int H5_ATTR_UNUSED fd, int H5_ATTR_UNUSED operation) { 647 /* just fail*/648 return -1;647 /* just pass */ 648 return 1; 649 649 } /* end Nflock() */ 650 650 651 651 -
test/swmr.c
4507 4507 ** This is for concurrent access. 4508 4508 ** 4509 4509 *****************************************************************/ 4510 #if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) && defined(H5_HAVE_FLOCK))4511 4510 4512 4511 static int 4513 4512 test_file_lock_concur(hid_t H5_ATTR_UNUSED in_fapl) … … 4520 4519 4521 4520 } /* end test_file_lock_concur() */ 4522 4521 4523 #else 4522 /* THIS TEST IS DISABLED IN THIS SOURCE PATCH 4523 * 4524 * The test will fail when file locking (disabled in this patch) 4525 * is non-functional so it is simply skipped. 4526 */ 4527 #if 0 4524 4528 4525 4529 static int 4526 4530 test_file_lock_concur(hid_t in_fapl) … … 4883 4887 ** This is for concurrent access. 4884 4888 ** 4885 4889 *****************************************************************/ 4886 #if !(defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID))4887 4890 4888 4891 static int 4889 4892 test_file_lock_swmr_concur(hid_t H5_ATTR_UNUSED in_fapl) … … 4896 4899 4897 4900 } /* end test_file_lock_swmr_concur() */ 4898 4901 4899 #else 4902 /* THIS TEST IS DISABLED IN THIS SOURCE PATCH 4903 * 4904 * The test will fail when file locking (disabled in this patch) 4905 * is non-functional so it is simply skipped. 4906 */ 4907 #if 0 4900 4908 4901 4909 static int 4902 4910 test_file_lock_swmr_concur(hid_t in_fapl)