Skip to content

Commit 9638955

Browse files
bodedogalbxela
authored andcommitted
[mtcr_ul] Remove flock() usage from READ4_PCI() WRITE4_PCI() macros
no need for this semaphore as we rely on the VSC's semaphore.
1 parent a0c1d7d commit 9638955

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

mtcr_ul/mtcr_ul_com.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -712,21 +712,7 @@ enum {
712712
do \
713713
{ \
714714
int rc; \
715-
int lock_rc; \
716-
ul_ctx_t* pci_ctx = mf->ul_ctx; \
717-
lock_rc = _flock_int(pci_ctx->fdlock, LOCK_EX); \
718-
if (lock_rc) \
719-
{ \
720-
perror(err_prefix); \
721-
action_on_fail; \
722-
} \
723715
rc = pread(mf->fd, val_ptr, 4, pci_offs); \
724-
lock_rc = _flock_int(pci_ctx->fdlock, LOCK_UN); \
725-
if (lock_rc) \
726-
{ \
727-
perror(err_prefix); \
728-
action_on_fail; \
729-
} \
730716
if (rc != 4) \
731717
{ \
732718
if (rc < 0) \
@@ -742,23 +728,9 @@ enum {
742728
do \
743729
{ \
744730
int rc; \
745-
int lock_rc; \
746731
u_int32_t val_le; \
747-
ul_ctx_t* pci_ctx = mf->ul_ctx; \
748732
val_le = __cpu_to_le32(val); \
749-
lock_rc = _flock_int(pci_ctx->fdlock, LOCK_EX); \
750-
if (lock_rc) \
751-
{ \
752-
perror(err_prefix); \
753-
action_on_fail; \
754-
} \
755733
rc = pwrite(mf->fd, &val_le, 4, pci_offs); \
756-
lock_rc = _flock_int(pci_ctx->fdlock, LOCK_UN); \
757-
if (lock_rc) \
758-
{ \
759-
perror(err_prefix); \
760-
action_on_fail; \
761-
} \
762734
if (rc != 4) \
763735
{ \
764736
if (rc < 0) \

0 commit comments

Comments
 (0)