* Also change _orig to _intr for clarity * Cleaned up {IPC,KER}VEC * Renamed _minix_kernel_info_struct to get_minix_kerninfo * Merged _senda.S into _ipc.S * Moved into separate files get_minix_kerninfo and _do_kernel_call * Adapted do_kernel_call to follow same _ convention as ipc functions * Drop patches in libc/net/send.c and libc/include/namespace.h Change-Id: If4ea21ecb65435170d7d87de6c826328e84c18d0
63 lines
1.9 KiB
C
63 lines
1.9 KiB
C
#include "syslib.h"
|
|
#include <assert.h>
|
|
#include <minix/sysutil.h>
|
|
|
|
/* SEF Ping callbacks. */
|
|
static struct sef_cbs {
|
|
sef_cb_ping_reply_t sef_cb_ping_reply;
|
|
} sef_cbs = {
|
|
SEF_CB_PING_REPLY_DEFAULT
|
|
};
|
|
|
|
/* SEF Ping prototypes for sef_receive(). */
|
|
int do_sef_ping_request(message *m_ptr);
|
|
|
|
/* Debug. */
|
|
EXTERN char* sef_debug_header(void);
|
|
|
|
/*===========================================================================*
|
|
* do_sef_ping_request *
|
|
*===========================================================================*/
|
|
int do_sef_ping_request(message *m_ptr)
|
|
{
|
|
/* Handle a SEF Ping request. */
|
|
|
|
/* Debug. */
|
|
#if SEF_PING_DEBUG
|
|
sef_ping_debug_begin();
|
|
sef_ping_dprint("%s. Got a SEF Ping request! About to reply.\n",
|
|
sef_debug_header());
|
|
sef_ping_debug_end();
|
|
#endif
|
|
|
|
/* Let the callback code handle the request. */
|
|
sef_cbs.sef_cb_ping_reply(m_ptr->m_source);
|
|
|
|
/* Return OK not to let anybody else intercept the request. */
|
|
return(OK);
|
|
}
|
|
|
|
/*===========================================================================*
|
|
* sef_setcb_ping_reply *
|
|
*===========================================================================*/
|
|
void sef_setcb_ping_reply(sef_cb_ping_reply_t cb)
|
|
{
|
|
assert(cb != NULL);
|
|
sef_cbs.sef_cb_ping_reply = cb;
|
|
}
|
|
|
|
/*===========================================================================*
|
|
* sef_cb_ping_reply_null *
|
|
*===========================================================================*/
|
|
void sef_cb_ping_reply_null(endpoint_t UNUSED(source))
|
|
{
|
|
}
|
|
|
|
/*===========================================================================*
|
|
* sef_cb_ping_reply_pong *
|
|
*===========================================================================*/
|
|
void sef_cb_ping_reply_pong(endpoint_t source)
|
|
{
|
|
ipc_notify(source);
|
|
}
|
|
|