From b6b65dd59c865c8fc9a00da793f37ce36bc2a1aa Mon Sep 17 00:00:00 2001 From: kozubal Date: Wed, 27 Nov 1991 08:51:14 +0000 Subject: [PATCH] Removed obsolete (uncompiled) code fro global locking. --- src/sequencer/seq_main.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/src/sequencer/seq_main.c b/src/sequencer/seq_main.c index 65a01fccd..a3c167de3 100644 --- a/src/sequencer/seq_main.c +++ b/src/sequencer/seq_main.c @@ -19,6 +19,7 @@ 16aug91,ajk Improved "magic number" error message. 25oct91,ajk Code to create semaphores "ss_ptr->getSemId" was left out. Added this code to init_sscb(). +25nov91,ajk Removed obsolete seqLog() code dealing with global locking. ***************************************************************************/ /*#define DEBUG 1*/ @@ -386,11 +387,6 @@ int nChar; return NULL; } /* Initialize logging */ -/****#define GLOBAL_LOCK****/ -#ifdef GLOBAL_LOCK -SEM_ID seq_log_sem = NULL; -#endif - LOCAL VOID seq_logInit(sp_ptr) SPROG *sp_ptr; { @@ -398,12 +394,7 @@ SPROG *sp_ptr; int fd; /* Create a logging resource locking semaphore */ -#ifdef GLOBAL_LOCK - if (seq_log_sem == NULL) - seq_log_sem = semMCreate(SEM_INVERSION_SAFE | SEM_DELETE_SAFE); -#else sp_ptr->logSemId = semMCreate(SEM_INVERSION_SAFE | SEM_DELETE_SAFE); -#endif sp_ptr->logFd = ioGlobalStdGet(1); /* default fd is std out */ /* Check for logfile spec. */ @@ -438,22 +429,15 @@ int arg1, arg2, arg3, arg4, arg5, arg6; /* arguments */ timeBfr[17] = 0; /* Lock seq_log resource */ -#ifdef GLOBAL_LOCK - semTake(seq_log_sem, WAIT_FOREVER); -#else semTake(sp_ptr->logSemId, WAIT_FOREVER); -#endif + /* Print the message: e.g. "10:23:28 T13: ...." */ fd = sp_ptr->logFd; fdprintf(fd, "%s %s: ", taskName(taskIdSelf()), &timeBfr[9]); fdprintf(fd, fmt, arg1, arg2, arg3, arg4, arg5, arg6); /* Unlock the resource */ -#ifdef GLOBAL_LOCK - semGive(seq_log_sem); -#else semGive(sp_ptr->logSemId); -#endif /* If NSF file then flush the buffer */ if (fd != ioGlobalStdGet(1) ) @@ -463,6 +447,7 @@ int arg1, arg2, arg3, arg4, arg5, arg6; /* arguments */ return; } + /* seqLog() - State program interface to seq_log() */ VOID seqLog(fmt, arg1, arg2, arg3, arg4, arg5, arg6) char *fmt; /* format string */