retire PUBLIC, PRIVATE and FORWARD
This commit is contained in:
@@ -12,24 +12,24 @@ struct errentry {
|
||||
};
|
||||
|
||||
/* Initialization errors. */
|
||||
PRIVATE struct errentry init_errlist[] = {
|
||||
static struct errentry init_errlist[] = {
|
||||
{ ENOSYS, "service does not support the requested initialization type" }
|
||||
};
|
||||
PRIVATE const int init_nerr = sizeof(init_errlist) / sizeof(init_errlist[0]);
|
||||
static const int init_nerr = sizeof(init_errlist) / sizeof(init_errlist[0]);
|
||||
|
||||
/* Live update errors. */
|
||||
PRIVATE struct errentry lu_errlist[] = {
|
||||
static struct errentry lu_errlist[] = {
|
||||
{ ENOSYS, "service does not support live update" },
|
||||
{ EINVAL, "service does not support the required state" },
|
||||
{ EBUSY, "service is not able to prepare for the update now" },
|
||||
{ EGENERIC, "generic error occurred while preparing for the update" }
|
||||
};
|
||||
PRIVATE const int lu_nerr = sizeof(lu_errlist) / sizeof(lu_errlist[0]);
|
||||
static const int lu_nerr = sizeof(lu_errlist) / sizeof(lu_errlist[0]);
|
||||
|
||||
/*===========================================================================*
|
||||
* rs_strerror *
|
||||
*===========================================================================*/
|
||||
PRIVATE char * rs_strerror(int errnum, struct errentry *errlist, const int nerr)
|
||||
static char * rs_strerror(int errnum, struct errentry *errlist, const int nerr)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -44,7 +44,7 @@ PRIVATE char * rs_strerror(int errnum, struct errentry *errlist, const int nerr)
|
||||
/*===========================================================================*
|
||||
* init_strerror *
|
||||
*===========================================================================*/
|
||||
PUBLIC char * init_strerror(int errnum)
|
||||
char * init_strerror(int errnum)
|
||||
{
|
||||
return rs_strerror(errnum, init_errlist, init_nerr);
|
||||
}
|
||||
@@ -52,7 +52,7 @@ PUBLIC char * init_strerror(int errnum)
|
||||
/*===========================================================================*
|
||||
* lu_strerror *
|
||||
*===========================================================================*/
|
||||
PUBLIC char * lu_strerror(int errnum)
|
||||
char * lu_strerror(int errnum)
|
||||
{
|
||||
return rs_strerror(errnum, lu_errlist, lu_nerr);
|
||||
}
|
||||
|
||||
@@ -15,23 +15,23 @@
|
||||
#include "kernel/proc.h"
|
||||
|
||||
/* Declare some local functions. */
|
||||
FORWARD void boot_image_info_lookup( endpoint_t endpoint, struct
|
||||
static void boot_image_info_lookup( endpoint_t endpoint, struct
|
||||
boot_image *image, struct boot_image **ip, struct boot_image_priv **pp,
|
||||
struct boot_image_sys **sp, struct boot_image_dev **dp);
|
||||
FORWARD void catch_boot_init_ready(endpoint_t endpoint);
|
||||
FORWARD void get_work(message *m_ptr, int *status_ptr);
|
||||
static void catch_boot_init_ready(endpoint_t endpoint);
|
||||
static void get_work(message *m_ptr, int *status_ptr);
|
||||
|
||||
/* SEF functions and variables. */
|
||||
FORWARD void sef_local_startup(void);
|
||||
FORWARD int sef_cb_init_fresh(int type, sef_init_info_t *info);
|
||||
FORWARD void sef_cb_signal_handler(int signo);
|
||||
FORWARD int sef_cb_signal_manager(endpoint_t target, int signo);
|
||||
static void sef_local_startup(void);
|
||||
static int sef_cb_init_fresh(int type, sef_init_info_t *info);
|
||||
static void sef_cb_signal_handler(int signo);
|
||||
static int sef_cb_signal_manager(endpoint_t target, int signo);
|
||||
|
||||
|
||||
/*===========================================================================*
|
||||
* main *
|
||||
*===========================================================================*/
|
||||
PUBLIC int main(void)
|
||||
int main(void)
|
||||
{
|
||||
/* This is the main routine of this service. The main loop consists of
|
||||
* three major activities: getting new work, processing the work, and
|
||||
@@ -134,7 +134,7 @@ PUBLIC int main(void)
|
||||
/*===========================================================================*
|
||||
* sef_local_startup *
|
||||
*===========================================================================*/
|
||||
PRIVATE void sef_local_startup()
|
||||
static void sef_local_startup()
|
||||
{
|
||||
/* Register init callbacks. */
|
||||
sef_setcb_init_response(do_init_ready);
|
||||
@@ -155,7 +155,7 @@ PRIVATE void sef_local_startup()
|
||||
/*===========================================================================*
|
||||
* sef_cb_init_fresh *
|
||||
*===========================================================================*/
|
||||
PRIVATE int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
{
|
||||
/* Initialize the reincarnation server. */
|
||||
struct boot_image *ip;
|
||||
@@ -483,7 +483,7 @@ PRIVATE int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
/*===========================================================================*
|
||||
* sef_cb_signal_handler *
|
||||
*===========================================================================*/
|
||||
PRIVATE void sef_cb_signal_handler(int signo)
|
||||
static void sef_cb_signal_handler(int signo)
|
||||
{
|
||||
/* Check for known signals, ignore anything else. */
|
||||
switch(signo) {
|
||||
@@ -499,7 +499,7 @@ PRIVATE void sef_cb_signal_handler(int signo)
|
||||
/*===========================================================================*
|
||||
* sef_cb_signal_manager *
|
||||
*===========================================================================*/
|
||||
PRIVATE int sef_cb_signal_manager(endpoint_t target, int signo)
|
||||
static int sef_cb_signal_manager(endpoint_t target, int signo)
|
||||
{
|
||||
/* Process system signal on behalf of the kernel. */
|
||||
int target_p;
|
||||
@@ -558,7 +558,7 @@ PRIVATE int sef_cb_signal_manager(endpoint_t target, int signo)
|
||||
/*===========================================================================*
|
||||
* boot_image_info_lookup *
|
||||
*===========================================================================*/
|
||||
PRIVATE void boot_image_info_lookup(endpoint, image, ip, pp, sp, dp)
|
||||
static void boot_image_info_lookup(endpoint, image, ip, pp, sp, dp)
|
||||
endpoint_t endpoint;
|
||||
struct boot_image *image;
|
||||
struct boot_image **ip;
|
||||
@@ -633,7 +633,7 @@ struct boot_image_dev **dp;
|
||||
/*===========================================================================*
|
||||
* catch_boot_init_ready *
|
||||
*===========================================================================*/
|
||||
PRIVATE void catch_boot_init_ready(endpoint)
|
||||
static void catch_boot_init_ready(endpoint)
|
||||
endpoint_t endpoint;
|
||||
{
|
||||
/* Block and catch an init ready message from the given source. */
|
||||
@@ -671,7 +671,7 @@ endpoint_t endpoint;
|
||||
/*===========================================================================*
|
||||
* get_work *
|
||||
*===========================================================================*/
|
||||
PRIVATE void get_work(m_ptr, status_ptr)
|
||||
static void get_work(m_ptr, status_ptr)
|
||||
message *m_ptr; /* pointer to message */
|
||||
int *status_ptr; /* pointer to status */
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/*===========================================================================*
|
||||
* caller_is_root *
|
||||
*===========================================================================*/
|
||||
PRIVATE int caller_is_root(endpoint)
|
||||
static int caller_is_root(endpoint)
|
||||
endpoint_t endpoint; /* caller endpoint */
|
||||
{
|
||||
uid_t euid;
|
||||
@@ -30,7 +30,7 @@ endpoint_t endpoint; /* caller endpoint */
|
||||
/*===========================================================================*
|
||||
* caller_can_control *
|
||||
*===========================================================================*/
|
||||
PRIVATE int caller_can_control(endpoint, target_rp)
|
||||
static int caller_can_control(endpoint, target_rp)
|
||||
endpoint_t endpoint;
|
||||
struct rproc *target_rp;
|
||||
{
|
||||
@@ -72,7 +72,7 @@ struct rproc *target_rp;
|
||||
/*===========================================================================*
|
||||
* check_call_permission *
|
||||
*===========================================================================*/
|
||||
PUBLIC int check_call_permission(caller, call, rp)
|
||||
int check_call_permission(caller, call, rp)
|
||||
endpoint_t caller;
|
||||
int call;
|
||||
struct rproc *rp;
|
||||
@@ -121,7 +121,7 @@ struct rproc *rp;
|
||||
/*===========================================================================*
|
||||
* copy_rs_start *
|
||||
*===========================================================================*/
|
||||
PUBLIC int copy_rs_start(src_e, src_rs_start, dst_rs_start)
|
||||
int copy_rs_start(src_e, src_rs_start, dst_rs_start)
|
||||
endpoint_t src_e;
|
||||
char *src_rs_start;
|
||||
struct rs_start *dst_rs_start;
|
||||
@@ -137,7 +137,7 @@ struct rs_start *dst_rs_start;
|
||||
/*===========================================================================*
|
||||
* copy_label *
|
||||
*===========================================================================*/
|
||||
PUBLIC int copy_label(src_e, src_label, src_len, dst_label, dst_len)
|
||||
int copy_label(src_e, src_label, src_len, dst_label, dst_len)
|
||||
endpoint_t src_e;
|
||||
char *src_label;
|
||||
size_t src_len;
|
||||
@@ -160,7 +160,7 @@ size_t dst_len;
|
||||
/*===========================================================================*
|
||||
* build_cmd_dep *
|
||||
*===========================================================================*/
|
||||
PUBLIC void build_cmd_dep(struct rproc *rp)
|
||||
void build_cmd_dep(struct rproc *rp)
|
||||
{
|
||||
struct rprocpub *rpub;
|
||||
int arg_count;
|
||||
@@ -211,7 +211,7 @@ PUBLIC void build_cmd_dep(struct rproc *rp)
|
||||
/*===========================================================================*
|
||||
* srv_fork *
|
||||
*===========================================================================*/
|
||||
PUBLIC pid_t srv_fork(uid_t reuid, gid_t regid)
|
||||
pid_t srv_fork(uid_t reuid, gid_t regid)
|
||||
{
|
||||
message m;
|
||||
|
||||
@@ -223,7 +223,7 @@ PUBLIC pid_t srv_fork(uid_t reuid, gid_t regid)
|
||||
/*===========================================================================*
|
||||
* srv_kill *
|
||||
*===========================================================================*/
|
||||
PUBLIC int srv_kill(pid_t pid, int sig)
|
||||
int srv_kill(pid_t pid, int sig)
|
||||
{
|
||||
message m;
|
||||
|
||||
@@ -235,7 +235,7 @@ PUBLIC int srv_kill(pid_t pid, int sig)
|
||||
/*===========================================================================*
|
||||
* srv_update *
|
||||
*===========================================================================*/
|
||||
PUBLIC int srv_update(endpoint_t src_e, endpoint_t dst_e)
|
||||
int srv_update(endpoint_t src_e, endpoint_t dst_e)
|
||||
{
|
||||
int r;
|
||||
|
||||
@@ -257,7 +257,7 @@ PUBLIC int srv_update(endpoint_t src_e, endpoint_t dst_e)
|
||||
/*===========================================================================*
|
||||
* update_period *
|
||||
*===========================================================================*/
|
||||
PUBLIC void update_period(message *m_ptr)
|
||||
void update_period(message *m_ptr)
|
||||
{
|
||||
clock_t now = m_ptr->NOTIFY_TIMESTAMP;
|
||||
short has_update_timed_out;
|
||||
@@ -294,7 +294,7 @@ PUBLIC void update_period(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* end_update *
|
||||
*===========================================================================*/
|
||||
PUBLIC void end_update(int result, int reply_flag)
|
||||
void end_update(int result, int reply_flag)
|
||||
{
|
||||
/* End the update process. There are two possibilities:
|
||||
* 1) the update succeeded. In that case, cleanup the old version and mark the
|
||||
@@ -353,7 +353,7 @@ PUBLIC void end_update(int result, int reply_flag)
|
||||
/*===========================================================================*
|
||||
* kill_service_debug *
|
||||
*===========================================================================*/
|
||||
PUBLIC int kill_service_debug(file, line, rp, errstr, err)
|
||||
int kill_service_debug(file, line, rp, errstr, err)
|
||||
char *file;
|
||||
int line;
|
||||
struct rproc *rp;
|
||||
@@ -373,7 +373,7 @@ int err;
|
||||
/*===========================================================================*
|
||||
* crash_service_debug *
|
||||
*===========================================================================*/
|
||||
PUBLIC int crash_service_debug(file, line, rp)
|
||||
int crash_service_debug(file, line, rp)
|
||||
char *file;
|
||||
int line;
|
||||
struct rproc *rp;
|
||||
@@ -398,7 +398,7 @@ struct rproc *rp;
|
||||
/*===========================================================================*
|
||||
* cleanup_service_debug *
|
||||
*===========================================================================*/
|
||||
PUBLIC void cleanup_service_debug(file, line, rp)
|
||||
void cleanup_service_debug(file, line, rp)
|
||||
char *file;
|
||||
int line;
|
||||
struct rproc *rp;
|
||||
@@ -433,7 +433,7 @@ struct rproc *rp;
|
||||
/*===========================================================================*
|
||||
* create_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC int create_service(rp)
|
||||
int create_service(rp)
|
||||
struct rproc *rp;
|
||||
{
|
||||
/* Create the given system service. */
|
||||
@@ -576,7 +576,7 @@ struct rproc *rp;
|
||||
/*===========================================================================*
|
||||
* clone_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC int clone_service(rp, instance_flag)
|
||||
int clone_service(rp, instance_flag)
|
||||
struct rproc *rp;
|
||||
int instance_flag;
|
||||
{
|
||||
@@ -642,7 +642,7 @@ int instance_flag;
|
||||
/*===========================================================================*
|
||||
* publish_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC int publish_service(rp)
|
||||
int publish_service(rp)
|
||||
struct rproc *rp; /* pointer to service slot */
|
||||
{
|
||||
/* Publish a service. */
|
||||
@@ -717,7 +717,7 @@ struct rproc *rp; /* pointer to service slot */
|
||||
/*===========================================================================*
|
||||
* unpublish_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC int unpublish_service(rp)
|
||||
int unpublish_service(rp)
|
||||
struct rproc *rp; /* pointer to service slot */
|
||||
{
|
||||
/* Unpublish a service. */
|
||||
@@ -774,7 +774,7 @@ struct rproc *rp; /* pointer to service slot */
|
||||
/*===========================================================================*
|
||||
* run_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC int run_service(rp, init_type)
|
||||
int run_service(rp, init_type)
|
||||
struct rproc *rp;
|
||||
int init_type;
|
||||
{
|
||||
@@ -803,7 +803,7 @@ int init_type;
|
||||
/*===========================================================================*
|
||||
* start_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC int start_service(rp)
|
||||
int start_service(rp)
|
||||
struct rproc *rp;
|
||||
{
|
||||
/* Start a system service. */
|
||||
@@ -842,7 +842,7 @@ struct rproc *rp;
|
||||
/*===========================================================================*
|
||||
* stop_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC void stop_service(struct rproc *rp,int how)
|
||||
void stop_service(struct rproc *rp,int how)
|
||||
{
|
||||
struct rprocpub *rpub;
|
||||
int signo;
|
||||
@@ -867,7 +867,7 @@ PUBLIC void stop_service(struct rproc *rp,int how)
|
||||
/*===========================================================================*
|
||||
* update_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC int update_service(src_rpp, dst_rpp, swap_flag)
|
||||
int update_service(src_rpp, dst_rpp, swap_flag)
|
||||
struct rproc **src_rpp;
|
||||
struct rproc **dst_rpp;
|
||||
int swap_flag;
|
||||
@@ -927,7 +927,7 @@ int swap_flag;
|
||||
/*===========================================================================*
|
||||
* activate_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC void activate_service(struct rproc *rp, struct rproc *ex_rp)
|
||||
void activate_service(struct rproc *rp, struct rproc *ex_rp)
|
||||
{
|
||||
/* Activate a service instance and deactivate another one if requested. */
|
||||
|
||||
@@ -947,7 +947,7 @@ PUBLIC void activate_service(struct rproc *rp, struct rproc *ex_rp)
|
||||
/*===========================================================================*
|
||||
* reincarnate_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC void reincarnate_service(struct rproc *rp)
|
||||
void reincarnate_service(struct rproc *rp)
|
||||
{
|
||||
/* Restart a service as if it were never started before. */
|
||||
struct rprocpub *rpub;
|
||||
@@ -981,7 +981,7 @@ PUBLIC void reincarnate_service(struct rproc *rp)
|
||||
/*===========================================================================*
|
||||
* terminate_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC void terminate_service(struct rproc *rp)
|
||||
void terminate_service(struct rproc *rp)
|
||||
{
|
||||
/* Handle a termination event for a system service. */
|
||||
struct rproc **rps;
|
||||
@@ -1074,7 +1074,7 @@ PUBLIC void terminate_service(struct rproc *rp)
|
||||
/*===========================================================================*
|
||||
* run_script *
|
||||
*===========================================================================*/
|
||||
PRIVATE int run_script(struct rproc *rp)
|
||||
static int run_script(struct rproc *rp)
|
||||
{
|
||||
int r, endpoint;
|
||||
pid_t pid;
|
||||
@@ -1129,7 +1129,7 @@ PRIVATE int run_script(struct rproc *rp)
|
||||
/*===========================================================================*
|
||||
* restart_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC void restart_service(struct rproc *rp)
|
||||
void restart_service(struct rproc *rp)
|
||||
{
|
||||
/* Restart service via a recovery script or directly. */
|
||||
struct rproc *replica_rp;
|
||||
@@ -1186,7 +1186,7 @@ PUBLIC void restart_service(struct rproc *rp)
|
||||
/*===========================================================================*
|
||||
* inherit_service_defaults *
|
||||
*===========================================================================*/
|
||||
PUBLIC void inherit_service_defaults(def_rp, rp)
|
||||
void inherit_service_defaults(def_rp, rp)
|
||||
struct rproc *def_rp;
|
||||
struct rproc *rp;
|
||||
{
|
||||
@@ -1216,7 +1216,7 @@ struct rproc *rp;
|
||||
/*===========================================================================*
|
||||
* get_service_instances *
|
||||
*===========================================================================*/
|
||||
PUBLIC void get_service_instances(rp, rps, length)
|
||||
void get_service_instances(rp, rps, length)
|
||||
struct rproc *rp;
|
||||
struct rproc ***rps;
|
||||
int *length;
|
||||
@@ -1239,7 +1239,7 @@ int *length;
|
||||
/*===========================================================================*
|
||||
* share_exec *
|
||||
*===========================================================================*/
|
||||
PUBLIC void share_exec(rp_dst, rp_src)
|
||||
void share_exec(rp_dst, rp_src)
|
||||
struct rproc *rp_dst, *rp_src;
|
||||
{
|
||||
struct rprocpub *rpub_src;
|
||||
@@ -1260,7 +1260,7 @@ struct rproc *rp_dst, *rp_src;
|
||||
/*===========================================================================*
|
||||
* read_exec *
|
||||
*===========================================================================*/
|
||||
PUBLIC int read_exec(rp)
|
||||
int read_exec(rp)
|
||||
struct rproc *rp;
|
||||
{
|
||||
int e, r, fd;
|
||||
@@ -1309,7 +1309,7 @@ struct rproc *rp;
|
||||
/*===========================================================================*
|
||||
* free_exec *
|
||||
*===========================================================================*/
|
||||
PUBLIC void free_exec(rp)
|
||||
void free_exec(rp)
|
||||
struct rproc *rp;
|
||||
{
|
||||
/* Free an exec image. */
|
||||
@@ -1345,7 +1345,7 @@ struct rproc *rp;
|
||||
/*===========================================================================*
|
||||
* edit_slot *
|
||||
*===========================================================================*/
|
||||
PUBLIC int edit_slot(rp, rs_start, source)
|
||||
int edit_slot(rp, rs_start, source)
|
||||
struct rproc *rp;
|
||||
struct rs_start *rs_start;
|
||||
endpoint_t source;
|
||||
@@ -1559,7 +1559,7 @@ endpoint_t source;
|
||||
/*===========================================================================*
|
||||
* init_slot *
|
||||
*===========================================================================*/
|
||||
PUBLIC int init_slot(rp, rs_start, source)
|
||||
int init_slot(rp, rs_start, source)
|
||||
struct rproc *rp;
|
||||
struct rs_start *rs_start;
|
||||
endpoint_t source;
|
||||
@@ -1641,7 +1641,7 @@ endpoint_t source;
|
||||
/*===========================================================================*
|
||||
* clone_slot *
|
||||
*===========================================================================*/
|
||||
PUBLIC int clone_slot(rp, clone_rpp)
|
||||
int clone_slot(rp, clone_rpp)
|
||||
struct rproc *rp;
|
||||
struct rproc **clone_rpp;
|
||||
{
|
||||
@@ -1695,7 +1695,7 @@ struct rproc **clone_rpp;
|
||||
/*===========================================================================*
|
||||
* swap_slot_pointer *
|
||||
*===========================================================================*/
|
||||
PRIVATE void swap_slot_pointer(struct rproc **rpp, struct rproc *src_rp,
|
||||
static void swap_slot_pointer(struct rproc **rpp, struct rproc *src_rp,
|
||||
struct rproc *dst_rp)
|
||||
{
|
||||
if(*rpp == src_rp) {
|
||||
@@ -1709,7 +1709,7 @@ PRIVATE void swap_slot_pointer(struct rproc **rpp, struct rproc *src_rp,
|
||||
/*===========================================================================*
|
||||
* swap_slot *
|
||||
*===========================================================================*/
|
||||
PUBLIC void swap_slot(src_rpp, dst_rpp)
|
||||
void swap_slot(src_rpp, dst_rpp)
|
||||
struct rproc **src_rpp;
|
||||
struct rproc **dst_rpp;
|
||||
{
|
||||
@@ -1771,7 +1771,7 @@ struct rproc **dst_rpp;
|
||||
/*===========================================================================*
|
||||
* lookup_slot_by_label *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct rproc* lookup_slot_by_label(char *label)
|
||||
struct rproc* lookup_slot_by_label(char *label)
|
||||
{
|
||||
/* Lookup a service slot matching the given label. */
|
||||
int slot_nr;
|
||||
@@ -1795,7 +1795,7 @@ PUBLIC struct rproc* lookup_slot_by_label(char *label)
|
||||
/*===========================================================================*
|
||||
* lookup_slot_by_pid *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct rproc* lookup_slot_by_pid(pid_t pid)
|
||||
struct rproc* lookup_slot_by_pid(pid_t pid)
|
||||
{
|
||||
/* Lookup a service slot matching the given pid. */
|
||||
int slot_nr;
|
||||
@@ -1821,7 +1821,7 @@ PUBLIC struct rproc* lookup_slot_by_pid(pid_t pid)
|
||||
/*===========================================================================*
|
||||
* lookup_slot_by_dev_nr *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct rproc* lookup_slot_by_dev_nr(dev_t dev_nr)
|
||||
struct rproc* lookup_slot_by_dev_nr(dev_t dev_nr)
|
||||
{
|
||||
/* Lookup a service slot matching the given device number. */
|
||||
int slot_nr;
|
||||
@@ -1849,7 +1849,7 @@ PUBLIC struct rproc* lookup_slot_by_dev_nr(dev_t dev_nr)
|
||||
/*===========================================================================*
|
||||
* lookup_slot_by_flags *
|
||||
*===========================================================================*/
|
||||
PUBLIC struct rproc* lookup_slot_by_flags(int flags)
|
||||
struct rproc* lookup_slot_by_flags(int flags)
|
||||
{
|
||||
/* Lookup a service slot matching the given flags. */
|
||||
int slot_nr;
|
||||
@@ -1875,7 +1875,7 @@ PUBLIC struct rproc* lookup_slot_by_flags(int flags)
|
||||
/*===========================================================================*
|
||||
* alloc_slot *
|
||||
*===========================================================================*/
|
||||
PUBLIC int alloc_slot(rpp)
|
||||
int alloc_slot(rpp)
|
||||
struct rproc **rpp;
|
||||
{
|
||||
/* Alloc a new system service slot. */
|
||||
@@ -1896,7 +1896,7 @@ struct rproc **rpp;
|
||||
/*===========================================================================*
|
||||
* free_slot *
|
||||
*===========================================================================*/
|
||||
PUBLIC void free_slot(rp)
|
||||
void free_slot(rp)
|
||||
struct rproc *rp;
|
||||
{
|
||||
/* Free a system service slot. */
|
||||
@@ -1923,7 +1923,7 @@ struct rproc *rp;
|
||||
/*===========================================================================*
|
||||
* get_next_name *
|
||||
*===========================================================================*/
|
||||
PRIVATE char *get_next_name(ptr, name, caller_label)
|
||||
static char *get_next_name(ptr, name, caller_label)
|
||||
char *ptr;
|
||||
char *name;
|
||||
char *caller_label;
|
||||
@@ -1965,7 +1965,7 @@ char *caller_label;
|
||||
/*===========================================================================*
|
||||
* add_forward_ipc *
|
||||
*===========================================================================*/
|
||||
PUBLIC void add_forward_ipc(rp, privp)
|
||||
void add_forward_ipc(rp, privp)
|
||||
struct rproc *rp;
|
||||
struct priv *privp;
|
||||
{
|
||||
@@ -2038,7 +2038,7 @@ struct priv *privp;
|
||||
/*===========================================================================*
|
||||
* add_backward_ipc *
|
||||
*===========================================================================*/
|
||||
PUBLIC void add_backward_ipc(rp, privp)
|
||||
void add_backward_ipc(rp, privp)
|
||||
struct rproc *rp;
|
||||
struct priv *privp;
|
||||
{
|
||||
@@ -2108,7 +2108,7 @@ struct priv *privp;
|
||||
/*===========================================================================*
|
||||
* init_privs *
|
||||
*===========================================================================*/
|
||||
PUBLIC void init_privs(rp, privp)
|
||||
void init_privs(rp, privp)
|
||||
struct rproc *rp;
|
||||
struct priv *privp;
|
||||
{
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
#undef minix_munmap
|
||||
#undef minix_munmap_text
|
||||
|
||||
PUBLIC int unmap_ok = 0;
|
||||
int unmap_ok = 0;
|
||||
|
||||
/*===========================================================================*
|
||||
* minix_munmap *
|
||||
*===========================================================================*/
|
||||
PUBLIC int minix_munmap(void *addrstart, vir_bytes len)
|
||||
int minix_munmap(void *addrstart, vir_bytes len)
|
||||
{
|
||||
if(!unmap_ok)
|
||||
return ENOSYS;
|
||||
@@ -28,7 +28,7 @@ PUBLIC int minix_munmap(void *addrstart, vir_bytes len)
|
||||
/*===========================================================================*
|
||||
* minix_munmap_text *
|
||||
*===========================================================================*/
|
||||
PUBLIC int minix_munmap_text(void *addrstart, vir_bytes len)
|
||||
int minix_munmap_text(void *addrstart, vir_bytes len)
|
||||
{
|
||||
if(!unmap_ok)
|
||||
return ENOSYS;
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
|
||||
#include "kernel/proc.h"
|
||||
|
||||
FORWARD int check_request(struct rs_start *rs_start);
|
||||
static int check_request(struct rs_start *rs_start);
|
||||
|
||||
/*===========================================================================*
|
||||
* do_up *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_up(m_ptr)
|
||||
int do_up(m_ptr)
|
||||
message *m_ptr; /* request message pointer */
|
||||
{
|
||||
/* A request was made to start a new system service. */
|
||||
@@ -86,7 +86,7 @@ message *m_ptr; /* request message pointer */
|
||||
/*===========================================================================*
|
||||
* do_down *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_down(message *m_ptr)
|
||||
int do_down(message *m_ptr)
|
||||
{
|
||||
register struct rproc *rp;
|
||||
register struct rprocpub *rpub;
|
||||
@@ -137,7 +137,7 @@ PUBLIC int do_down(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_restart *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_restart(message *m_ptr)
|
||||
int do_restart(message *m_ptr)
|
||||
{
|
||||
struct rproc *rp;
|
||||
int s, r;
|
||||
@@ -185,7 +185,7 @@ PUBLIC int do_restart(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_clone *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_clone(message *m_ptr)
|
||||
int do_clone(message *m_ptr)
|
||||
{
|
||||
struct rproc *rp;
|
||||
struct rprocpub *rpub;
|
||||
@@ -230,7 +230,7 @@ PUBLIC int do_clone(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_edit *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_edit(message *m_ptr)
|
||||
int do_edit(message *m_ptr)
|
||||
{
|
||||
struct rproc *rp;
|
||||
struct rprocpub *rpub;
|
||||
@@ -321,7 +321,7 @@ PUBLIC int do_edit(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_refresh *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_refresh(message *m_ptr)
|
||||
int do_refresh(message *m_ptr)
|
||||
{
|
||||
register struct rproc *rp;
|
||||
register struct rprocpub *rpub;
|
||||
@@ -359,7 +359,7 @@ PUBLIC int do_refresh(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_shutdown *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_shutdown(message *m_ptr)
|
||||
int do_shutdown(message *m_ptr)
|
||||
{
|
||||
int slot_nr;
|
||||
struct rproc *rp;
|
||||
@@ -390,7 +390,7 @@ PUBLIC int do_shutdown(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_init_ready *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_init_ready(message *m_ptr)
|
||||
int do_init_ready(message *m_ptr)
|
||||
{
|
||||
int who_p;
|
||||
message m;
|
||||
@@ -480,7 +480,7 @@ PUBLIC int do_init_ready(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_update *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_update(message *m_ptr)
|
||||
int do_update(message *m_ptr)
|
||||
{
|
||||
struct rproc *rp;
|
||||
struct rproc *new_rp;
|
||||
@@ -651,7 +651,7 @@ PUBLIC int do_update(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_upd_ready *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_upd_ready(message *m_ptr)
|
||||
int do_upd_ready(message *m_ptr)
|
||||
{
|
||||
struct rproc *rp, *old_rp, *new_rp;
|
||||
int who_p;
|
||||
@@ -728,7 +728,7 @@ PUBLIC int do_upd_ready(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_period *
|
||||
*===========================================================================*/
|
||||
PUBLIC void do_period(m_ptr)
|
||||
void do_period(m_ptr)
|
||||
message *m_ptr;
|
||||
{
|
||||
register struct rproc *rp;
|
||||
@@ -826,7 +826,7 @@ message *m_ptr;
|
||||
/*===========================================================================*
|
||||
* do_sigchld *
|
||||
*===========================================================================*/
|
||||
PUBLIC void do_sigchld()
|
||||
void do_sigchld()
|
||||
{
|
||||
/* PM informed us that there are dead children to cleanup. Go get them. */
|
||||
pid_t pid;
|
||||
@@ -867,7 +867,7 @@ PUBLIC void do_sigchld()
|
||||
/*===========================================================================*
|
||||
* do_getsysinfo *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_getsysinfo(m_ptr)
|
||||
int do_getsysinfo(m_ptr)
|
||||
message *m_ptr;
|
||||
{
|
||||
vir_bytes src_addr, dst_addr;
|
||||
@@ -903,7 +903,7 @@ message *m_ptr;
|
||||
/*===========================================================================*
|
||||
* do_lookup *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_lookup(m_ptr)
|
||||
int do_lookup(m_ptr)
|
||||
message *m_ptr;
|
||||
{
|
||||
static char namebuf[100];
|
||||
@@ -940,7 +940,7 @@ message *m_ptr;
|
||||
/*===========================================================================*
|
||||
* check_request *
|
||||
*===========================================================================*/
|
||||
PRIVATE int check_request(struct rs_start *rs_start)
|
||||
static int check_request(struct rs_start *rs_start)
|
||||
{
|
||||
/* Verify scheduling parameters */
|
||||
if (rs_start->rss_scheduler != KERNEL &&
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* reflects the order boot system services are made runnable and initialized
|
||||
* at boot time.
|
||||
*/
|
||||
PUBLIC struct boot_image_priv boot_image_priv_table[] = {
|
||||
struct boot_image_priv boot_image_priv_table[] = {
|
||||
/*endpoint, label, flags, */
|
||||
{RS_PROC_NR, "rs", RSYS_F },
|
||||
{VM_PROC_NR, "vm", VM_F },
|
||||
@@ -30,7 +30,7 @@ PUBLIC struct boot_image_priv boot_image_priv_table[] = {
|
||||
};
|
||||
|
||||
/* Definition of the boot image sys table. */
|
||||
PUBLIC struct boot_image_sys boot_image_sys_table[] = {
|
||||
struct boot_image_sys boot_image_sys_table[] = {
|
||||
/*endpoint, flags */
|
||||
{ RS_PROC_NR, SRVR_SF },
|
||||
{ VM_PROC_NR, VM_SF },
|
||||
@@ -43,7 +43,7 @@ PUBLIC struct boot_image_sys boot_image_sys_table[] = {
|
||||
};
|
||||
|
||||
/* Definition of the boot image dev table. */
|
||||
PUBLIC struct boot_image_dev boot_image_dev_table[] = {
|
||||
struct boot_image_dev boot_image_dev_table[] = {
|
||||
/*endpoint, flags, dev_nr, dev_style, dev_style2 */
|
||||
{ TTY_PROC_NR, SRV_DF, TTY_MAJOR, STYLE_TTY, STYLE_CTTY },
|
||||
{ MEM_PROC_NR, SRV_DF, MEMORY_MAJOR, STYLE_DEV, STYLE_NDEV },
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/*===========================================================================*
|
||||
* init_service *
|
||||
*===========================================================================*/
|
||||
PUBLIC int init_service(rp, type)
|
||||
int init_service(rp, type)
|
||||
struct rproc *rp; /* pointer to process slot */
|
||||
int type; /* type of initialization */
|
||||
{
|
||||
@@ -54,7 +54,7 @@ int type; /* type of initialization */
|
||||
/*===========================================================================*
|
||||
* fill_send_mask *
|
||||
*===========================================================================*/
|
||||
PUBLIC void fill_send_mask(send_mask, set_bits)
|
||||
void fill_send_mask(send_mask, set_bits)
|
||||
sys_map_t *send_mask; /* the send mask to fill in */
|
||||
int set_bits; /* TRUE sets all bits, FALSE clears all bits */
|
||||
{
|
||||
@@ -72,7 +72,7 @@ int set_bits; /* TRUE sets all bits, FALSE clears all bits */
|
||||
/*===========================================================================*
|
||||
* fill_call_mask *
|
||||
*===========================================================================*/
|
||||
PUBLIC void fill_call_mask(calls, tot_nr_calls, call_mask, call_base, is_init)
|
||||
void fill_call_mask(calls, tot_nr_calls, call_mask, call_base, is_init)
|
||||
int *calls; /* the unordered set of calls */
|
||||
int tot_nr_calls; /* the total number of calls */
|
||||
bitchunk_t *call_mask; /* the call mask to fill in */
|
||||
@@ -114,7 +114,7 @@ int is_init; /* set when initializing a call mask */
|
||||
/*===========================================================================*
|
||||
* srv_to_string *
|
||||
*===========================================================================*/
|
||||
PUBLIC char* srv_to_string(rp)
|
||||
char* srv_to_string(rp)
|
||||
struct rproc *rp; /* pointer to process slot */
|
||||
{
|
||||
struct rprocpub *rpub;
|
||||
@@ -152,7 +152,7 @@ struct rproc *rp; /* pointer to process slot */
|
||||
/*===========================================================================*
|
||||
* reply *
|
||||
*===========================================================================*/
|
||||
PUBLIC void reply(who, rp, m_ptr)
|
||||
void reply(who, rp, m_ptr)
|
||||
endpoint_t who; /* replyee */
|
||||
struct rproc *rp; /* replyee slot (if any) */
|
||||
message *m_ptr; /* reply message */
|
||||
@@ -175,7 +175,7 @@ message *m_ptr; /* reply message */
|
||||
/*===========================================================================*
|
||||
* late_reply *
|
||||
*===========================================================================*/
|
||||
PUBLIC void late_reply(rp, code)
|
||||
void late_reply(rp, code)
|
||||
struct rproc *rp; /* pointer to process slot */
|
||||
int code; /* status code */
|
||||
{
|
||||
@@ -199,7 +199,7 @@ int code; /* status code */
|
||||
/*===========================================================================*
|
||||
* rs_isokendpt *
|
||||
*===========================================================================*/
|
||||
PUBLIC int rs_isokendpt(endpoint_t endpoint, int *proc)
|
||||
int rs_isokendpt(endpoint_t endpoint, int *proc)
|
||||
{
|
||||
*proc = _ENDPOINT_P(endpoint);
|
||||
if(*proc < -NR_TASKS || *proc >= NR_PROCS)
|
||||
@@ -211,7 +211,7 @@ PUBLIC int rs_isokendpt(endpoint_t endpoint, int *proc)
|
||||
/*===========================================================================*
|
||||
* sched_init_proc *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sched_init_proc(struct rproc *rp)
|
||||
int sched_init_proc(struct rproc *rp)
|
||||
{
|
||||
int s;
|
||||
int is_usr_proc;
|
||||
@@ -234,7 +234,7 @@ PUBLIC int sched_init_proc(struct rproc *rp)
|
||||
/*===========================================================================*
|
||||
* update_sig_mgrs *
|
||||
*===========================================================================*/
|
||||
PUBLIC int update_sig_mgrs(struct rproc *rp, endpoint_t sig_mgr,
|
||||
int update_sig_mgrs(struct rproc *rp, endpoint_t sig_mgr,
|
||||
endpoint_t bak_sig_mgr)
|
||||
{
|
||||
int r;
|
||||
|
||||
Reference in New Issue
Block a user