Skip to content

Commit

Permalink
default build for Linux, semaphore fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pahihu committed Feb 23, 2020
1 parent 05abe8b commit 38603ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# Copyright (c) Raymond Douglas Newman, 1999 - 2016
# with help from Sam Habiel

OSTYPE = darwin
CC = gcc
OSTYPE = linux
CC = gcc -g
LIBS = -lm -lcrypt

EXTRA = -O3 -fsigned-char -Wall -Iinclude -Imv1api -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -DMV1_DLMALLOC=1
EXTRA = -O -fsigned-char -Wall -Iinclude -Imv1api -D_FILE_OFFSET_BITS=64 #-DNDEBUG=1 -DMV1_DLMALLOC=1
ifeq ($(MAKECMDGOALS),test)
EXTRA = -O0 -g -fsigned-char -Wall -Iinclude -Imv1api -D_FILE_OFFSET_BITS=64
endif
Expand Down
2 changes: 2 additions & 0 deletions util/util_share.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ short SemOpEx(int sem_num, int numb,
{ if (partab.jobtab == NULL) // from a daemon
panic("SemOp() error in write daemon"); // yes - die
if (partab.jobtab->trap) // and we got a <Ctrl><C>
{ curr_sem[sem_num][volnum] -= numb; // adjust tracking info
return -(ERRZ51+ERRMLAST); // return an error
}
}
}
curr_sem[sem_num][volnum] -= numb;
Expand Down
3 changes: 1 addition & 2 deletions util/util_usync.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ AO_t inter_add(volatile AO_t *ptr, AO_t incr)
#endif

#ifndef USE_LIBATOMIC_OPS
static LATCH_T LATCH_FREE;
#define LATCH_FREE 0
#endif


Expand All @@ -53,7 +53,6 @@ void MV1LatchInit(MV1LATCH_T *latch)
*latch = AO_TS_INITIALIZER;
#else
MV1LatchUnlock(latch);
LATCH_FREE = *latch;
#endif
}

Expand Down

0 comments on commit 38603ea

Please sign in to comment.