Cleaned up src/lib/utils library. Renamed server_ functions to more logical
names. All system processes can now either use panic() or report() from libutils, or redefine their own function. Assertions are done via the standard <assert.h> functionality.
This commit is contained in:
@@ -43,7 +43,6 @@ OBJECTS = \
|
||||
$(LIBSYS)(sys_voutw.o) \
|
||||
$(LIBSYS)(sys_voutl.o) \
|
||||
$(LIBSYS)(sys_signalrm.o) \
|
||||
$(LIBSYS)(sys_flagalrm.o) \
|
||||
$(LIBSYS)(sys_syncalrm.o) \
|
||||
$(LIBSYS)(sys_physzero.o) \
|
||||
$(LIBSYS)(taskcall.o) \
|
||||
@@ -160,9 +159,6 @@ $(LIBSYS)(sys_vinl.o): sys_vinl.c
|
||||
$(LIBSYS)(sys_signalrm.o): sys_signalrm.c
|
||||
$(CC1) sys_signalrm.c
|
||||
|
||||
$(LIBSYS)(sys_flagalrm.o): sys_flagalrm.c
|
||||
$(CC1) sys_flagalrm.c
|
||||
|
||||
$(LIBSYS)(sys_syncalrm.o): sys_syncalrm.c
|
||||
$(CC1) sys_syncalrm.c
|
||||
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#include "syslib.h"
|
||||
|
||||
/*===========================================================================*
|
||||
* sys_flagalrm *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_flagalrm(ticks, flag_ptr)
|
||||
clock_t ticks; /* number of ticks until the flag is set */
|
||||
int *flag_ptr; /* pointer to timeout flag to be set */
|
||||
{
|
||||
/* Make a call to the clock to schedule a timeout flag alarm for the caller. */
|
||||
message m;
|
||||
|
||||
if (flag_ptr != NULL) /* expect the worst */
|
||||
*flag_ptr = 0; /* reset timeout flag first */
|
||||
m.m_type = SYS_FLAGALRM; /* alarm type requested */
|
||||
m.ALRM_PROC_NR = SELF; /* m_source will be used */
|
||||
m.ALRM_EXP_TIME = ticks; /* alarm is due after ticks */
|
||||
m.ALRM_ABS_TIME = 0; /* ticks are relative to now */
|
||||
m.ALRM_FLAG_PTR = (char *) flag_ptr;
|
||||
return _taskcall(SYSTASK, SYS_FLAGALRM, &m);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user