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:
Jorrit Herder
2005-06-01 14:31:00 +00:00
parent 75689debe3
commit 6d23f072f3
58 changed files with 364 additions and 498 deletions
+2 -17
View File
@@ -80,21 +80,6 @@ PUBLIC void main(void)
}
/*===========================================================================*
* report *
*===========================================================================*/
PUBLIC void report(mess, num)
char *mess; /* message format to print */
int num; /* number to go with the message */
{
if (num != NO_NUM) {
printf("IS: %s %d\n", mess, num);
} else {
printf("IS: %s\n", mess);
}
}
/*===========================================================================*
* init_server *
*===========================================================================*/
@@ -128,7 +113,7 @@ PRIVATE void get_work()
int status = 0;
status = receive(ANY, &m_in); /* this blocks until message arrives */
if (OK != status)
server_panic("IS","failed to receive message!", status);
panic("IS","failed to receive message!", status);
who = m_in.m_source; /* message arrived! set sender */
callnr = m_in.m_type; /* set function call number */
}
@@ -145,7 +130,7 @@ int result; /* report result to replyee */
m_out.m_type = result; /* build reply message */
send_status = send(who, &m_out); /* send the message */
if (OK != send_status)
server_panic("IS", "unable to send reply!", send_status);
panic("IS", "unable to send reply!", send_status);
}