retire PUBLIC, PRIVATE and FORWARD
This commit is contained in:
@@ -18,14 +18,14 @@
|
||||
#include <errno.h>
|
||||
|
||||
#define ASYN_NR (2*_NR_PROCS)
|
||||
PRIVATE asynmsg_t msgtable[ASYN_NR];
|
||||
PRIVATE int first_slot = 0, next_slot = 0;
|
||||
PRIVATE int initialized = 0;
|
||||
static asynmsg_t msgtable[ASYN_NR];
|
||||
static int first_slot = 0, next_slot = 0;
|
||||
static int initialized = 0;
|
||||
|
||||
/*===========================================================================*
|
||||
* asynsend3 *
|
||||
*===========================================================================*/
|
||||
PUBLIC int asynsend3(dst, mp, fl)
|
||||
int asynsend3(dst, mp, fl)
|
||||
endpoint_t dst;
|
||||
message *mp;
|
||||
int fl;
|
||||
@@ -147,7 +147,7 @@ int fl;
|
||||
/*===========================================================================*
|
||||
* asyn_geterror *
|
||||
*===========================================================================*/
|
||||
PUBLIC int asyn_geterror(endpoint_t *dst, message *msg, int *err)
|
||||
int asyn_geterror(endpoint_t *dst, message *msg, int *err)
|
||||
{
|
||||
int src_ind, flags, result;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
static message m;
|
||||
|
||||
PRIVATE int do_invoke_ds(int type, const char *ds_name)
|
||||
static int do_invoke_ds(int type, const char *ds_name)
|
||||
{
|
||||
cp_grant_id_t g_key;
|
||||
size_t len_key;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
#include "sysutil.h"
|
||||
#include <string.h>
|
||||
|
||||
PUBLIC int env_argc = 0;
|
||||
PUBLIC char **env_argv = NULL;
|
||||
int env_argc = 0;
|
||||
char **env_argv = NULL;
|
||||
|
||||
FORWARD char *find_key(const char *params, const char *key);
|
||||
static char *find_key(const char *params, const char *key);
|
||||
|
||||
/*===========================================================================*
|
||||
* env_setargs *
|
||||
*===========================================================================*/
|
||||
PUBLIC void env_setargs(arg_c, arg_v)
|
||||
void env_setargs(arg_c, arg_v)
|
||||
int arg_c;
|
||||
char *arg_v[];
|
||||
{
|
||||
@@ -20,7 +20,7 @@ char *arg_v[];
|
||||
/*===========================================================================*
|
||||
* env_get_param *
|
||||
*===========================================================================*/
|
||||
PUBLIC int env_get_param(key, value, max_len)
|
||||
int env_get_param(key, value, max_len)
|
||||
char *key; /* which key to look up */
|
||||
char *value; /* where to store value */
|
||||
int max_len; /* maximum length of value */
|
||||
@@ -80,7 +80,7 @@ int max_len; /* maximum length of value */
|
||||
/*==========================================================================*
|
||||
* find_key *
|
||||
*==========================================================================*/
|
||||
PRIVATE char *find_key(params,name)
|
||||
static char *find_key(params,name)
|
||||
const char *params;
|
||||
const char *name;
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/*=========================================================================*
|
||||
* env_panic *
|
||||
*=========================================================================*/
|
||||
PUBLIC void env_panic(key)
|
||||
void env_panic(key)
|
||||
char *key; /* environment variable whose value is bogus */
|
||||
{
|
||||
static char value[EP_BUF_SIZE] = "<unknown>";
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/*=========================================================================*
|
||||
* env_parse *
|
||||
*=========================================================================*/
|
||||
PUBLIC int env_parse(env, fmt, field, param, min, max)
|
||||
int env_parse(env, fmt, field, param, min, max)
|
||||
char *env; /* environment variable to inspect */
|
||||
char *fmt; /* template to parse it with */
|
||||
int field; /* field number of value to return */
|
||||
@@ -93,7 +93,7 @@ badenv:
|
||||
* env_memory_parse *
|
||||
*=========================================================================*/
|
||||
|
||||
PUBLIC int env_memory_parse(mem_chunks, maxchunks)
|
||||
int env_memory_parse(mem_chunks, maxchunks)
|
||||
struct memory *mem_chunks; /* where to store the memory bits */
|
||||
int maxchunks; /* how many were found */
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/*=========================================================================*
|
||||
* env_prefix *
|
||||
*=========================================================================*/
|
||||
PUBLIC int env_prefix(env, prefix)
|
||||
int env_prefix(env, prefix)
|
||||
char *env; /* environment variable to inspect */
|
||||
char *prefix; /* prefix to test for */
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* fkey_ctl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fkey_ctl(request, fkeys, sfkeys)
|
||||
int fkey_ctl(request, fkeys, sfkeys)
|
||||
int request; /* request to perform */
|
||||
int *fkeys; /* bit masks for F1-F12 keys */
|
||||
int *sfkeys; /* bit masks for Shift F1-F12 keys */
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/*===========================================================================*
|
||||
* get_randomness *
|
||||
*===========================================================================*/
|
||||
PUBLIC void get_randomness(rand, source)
|
||||
void get_randomness(rand, source)
|
||||
struct k_randomness *rand;
|
||||
int source;
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <minix/sysinfo.h>
|
||||
#include <minix/com.h>
|
||||
|
||||
PUBLIC int getsysinfo(
|
||||
int getsysinfo(
|
||||
endpoint_t who, /* from whom to request info */
|
||||
int what, /* what information is requested */
|
||||
void *where, /* where to put it */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* getuptime *
|
||||
*===========================================================================*/
|
||||
PUBLIC int getuptime(ticks)
|
||||
int getuptime(ticks)
|
||||
clock_t *ticks; /* uptime in ticks */
|
||||
{
|
||||
message m;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* getuptime2 *
|
||||
*===========================================================================*/
|
||||
PUBLIC int getuptime2(ticks, boottime)
|
||||
int getuptime2(ticks, boottime)
|
||||
clock_t *ticks; /* uptime in ticks */
|
||||
time_t *boottime;
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*****************************************************************************
|
||||
* tty_inject_event *
|
||||
*****************************************************************************/
|
||||
PUBLIC int tty_inject_event(type, code, val)
|
||||
int tty_inject_event(type, code, val)
|
||||
int type;
|
||||
int code;
|
||||
int val;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include <lib.h>
|
||||
#include <minix/syslib.h>
|
||||
|
||||
PUBLIC int _kernel_call(int syscallnr, message *msgptr)
|
||||
int _kernel_call(int syscallnr, message *msgptr)
|
||||
{
|
||||
msgptr->m_type = syscallnr;
|
||||
_do_kernel_call(msgptr);
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
#include <minix/const.h>
|
||||
#include <minix/optset.h>
|
||||
|
||||
FORWARD void optset_parse_entry(struct optset *entry, char *ptr, int
|
||||
static void optset_parse_entry(struct optset *entry, char *ptr, int
|
||||
len);
|
||||
|
||||
/*===========================================================================*
|
||||
* optset_parse_entry *
|
||||
*===========================================================================*/
|
||||
PRIVATE void optset_parse_entry(entry, ptr, len)
|
||||
static void optset_parse_entry(entry, ptr, len)
|
||||
struct optset *entry;
|
||||
char *ptr;
|
||||
int len;
|
||||
@@ -68,7 +68,7 @@ int len;
|
||||
/*===========================================================================*
|
||||
* optset_parse *
|
||||
*===========================================================================*/
|
||||
PUBLIC void optset_parse(table, string)
|
||||
void optset_parse(table, string)
|
||||
struct optset *table;
|
||||
char *string;
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/*===========================================================================*
|
||||
* panic *
|
||||
*===========================================================================*/
|
||||
PUBLIC void panic(const char *fmt, ...)
|
||||
void panic(const char *fmt, ...)
|
||||
{
|
||||
/* Something awful has happened. Panics are caused when an internal
|
||||
* inconsistency is detected, e.g., a programming error or illegal
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_attr_r16.c
|
||||
/*===========================================================================*
|
||||
* pci_attr_r16 *
|
||||
*===========================================================================*/
|
||||
PUBLIC u16_t pci_attr_r16(devind, port)
|
||||
u16_t pci_attr_r16(devind, port)
|
||||
int devind;
|
||||
int port;
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_attr_r32.c
|
||||
/*===========================================================================*
|
||||
* pci_attr_r32 *
|
||||
*===========================================================================*/
|
||||
PUBLIC u32_t pci_attr_r32(devind, port)
|
||||
u32_t pci_attr_r32(devind, port)
|
||||
int devind;
|
||||
int port;
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_attr_r8.c
|
||||
/*===========================================================================*
|
||||
* pci_attr_r8 *
|
||||
*===========================================================================*/
|
||||
PUBLIC u8_t pci_attr_r8(devind, port)
|
||||
u8_t pci_attr_r8(devind, port)
|
||||
int devind;
|
||||
int port;
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_attr_w16.c
|
||||
/*===========================================================================*
|
||||
* pci_attr_w16 *
|
||||
*===========================================================================*/
|
||||
PUBLIC void pci_attr_w16(int devind, int port, u16_t value)
|
||||
void pci_attr_w16(int devind, int port, u16_t value)
|
||||
{
|
||||
int r;
|
||||
message m;
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_attr_w32.c
|
||||
/*===========================================================================*
|
||||
* pci_attr_w32 *
|
||||
*===========================================================================*/
|
||||
PUBLIC void pci_attr_w32(int devind, int port, u32_t value)
|
||||
void pci_attr_w32(int devind, int port, u32_t value)
|
||||
{
|
||||
int r;
|
||||
message m;
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_attr_w8.c
|
||||
/*===========================================================================*
|
||||
* pci_attr_w8 *
|
||||
*===========================================================================*/
|
||||
PUBLIC void pci_attr_w8(int devind, int port, u8_t value)
|
||||
void pci_attr_w8(int devind, int port, u8_t value)
|
||||
{
|
||||
int r;
|
||||
message m;
|
||||
|
||||
@@ -12,7 +12,7 @@ pci_del_acl.c
|
||||
/*===========================================================================*
|
||||
* pci_del_acl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int pci_del_acl(proc_ep)
|
||||
int pci_del_acl(proc_ep)
|
||||
endpoint_t proc_ep;
|
||||
{
|
||||
int r;
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_dev_name.c
|
||||
/*===========================================================================*
|
||||
* pci_dev_name *
|
||||
*===========================================================================*/
|
||||
PUBLIC char *pci_dev_name(u16_t vid, u16_t did)
|
||||
char *pci_dev_name(u16_t vid, u16_t did)
|
||||
{
|
||||
static char name[80]; /* We need a better interface for this */
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_find_dev.c
|
||||
/*===========================================================================*
|
||||
* pci_find_dev *
|
||||
*===========================================================================*/
|
||||
PUBLIC int pci_find_dev(u8_t bus, u8_t dev, u8_t func, int *devindp)
|
||||
int pci_find_dev(u8_t bus, u8_t dev, u8_t func, int *devindp)
|
||||
{
|
||||
int r;
|
||||
message m;
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_first_dev.c
|
||||
/*===========================================================================*
|
||||
* pci_first_dev *
|
||||
*===========================================================================*/
|
||||
PUBLIC int pci_first_dev(devindp, vidp, didp)
|
||||
int pci_first_dev(devindp, vidp, didp)
|
||||
int *devindp;
|
||||
u16_t *vidp;
|
||||
u16_t *didp;
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_get_bar.c
|
||||
/*===========================================================================*
|
||||
* pci_get_bar *
|
||||
*===========================================================================*/
|
||||
PUBLIC int pci_get_bar(devind, port, base, size, ioflag)
|
||||
int pci_get_bar(devind, port, base, size, ioflag)
|
||||
int devind;
|
||||
int port;
|
||||
u32_t *base;
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_ids.c
|
||||
/*===========================================================================*
|
||||
* pci_ids *
|
||||
*===========================================================================*/
|
||||
PUBLIC void pci_ids(devind, vidp, didp)
|
||||
void pci_ids(devind, vidp, didp)
|
||||
int devind;
|
||||
u16_t *vidp;
|
||||
u16_t *didp;
|
||||
|
||||
@@ -11,7 +11,7 @@ endpoint_t pci_procnr= ANY;
|
||||
/*===========================================================================*
|
||||
* pci_init *
|
||||
*===========================================================================*/
|
||||
PUBLIC void pci_init(void)
|
||||
void pci_init(void)
|
||||
{
|
||||
int r;
|
||||
message m;
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_next_dev.c
|
||||
/*===========================================================================*
|
||||
* pci_next_dev *
|
||||
*===========================================================================*/
|
||||
PUBLIC int pci_next_dev(devindp, vidp, didp)
|
||||
int pci_next_dev(devindp, vidp, didp)
|
||||
int *devindp;
|
||||
u16_t *vidp;
|
||||
u16_t *didp;
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_rescan_bus.c
|
||||
/*===========================================================================*
|
||||
* pci_rescan_bus *
|
||||
*===========================================================================*/
|
||||
PUBLIC void pci_rescan_bus(u8_t busnr)
|
||||
void pci_rescan_bus(u8_t busnr)
|
||||
{
|
||||
int r;
|
||||
message m;
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_reserve.c
|
||||
/*===========================================================================*
|
||||
* pci_reserve *
|
||||
*===========================================================================*/
|
||||
PUBLIC void pci_reserve(devind)
|
||||
void pci_reserve(devind)
|
||||
int devind;
|
||||
{
|
||||
int r;
|
||||
@@ -29,7 +29,7 @@ int devind;
|
||||
/*===========================================================================*
|
||||
* pci_reserve_ok *
|
||||
*===========================================================================*/
|
||||
PUBLIC int pci_reserve_ok(int devind)
|
||||
int pci_reserve_ok(int devind)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ pci_set_acl.c
|
||||
/*===========================================================================*
|
||||
* pci_set_acl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int pci_set_acl(rs_pci)
|
||||
int pci_set_acl(rs_pci)
|
||||
struct rs_pci *rs_pci;
|
||||
{
|
||||
int r;
|
||||
|
||||
@@ -9,7 +9,7 @@ pci_slot_name.c
|
||||
/*===========================================================================*
|
||||
* pci_slot_name *
|
||||
*===========================================================================*/
|
||||
PUBLIC char *pci_slot_name(devind)
|
||||
char *pci_slot_name(devind)
|
||||
int devind;
|
||||
{
|
||||
static char name[80]; /* We need a better interface for this */
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
#include <minix/u64.h>
|
||||
#include <minix/minlib.h>
|
||||
|
||||
PRIVATE char cpath[CPROF_CPATH_MAX_LEN]; /* current call path string */
|
||||
PRIVATE int cpath_len; /* current call path len */
|
||||
PRIVATE struct cprof_tbl_s *cprof_slot; /* slot of current function */
|
||||
static char cpath[CPROF_CPATH_MAX_LEN]; /* current call path string */
|
||||
static int cpath_len; /* current call path len */
|
||||
static struct cprof_tbl_s *cprof_slot; /* slot of current function */
|
||||
struct stack_s { /* stack entry */
|
||||
int cpath_len; /* call path len */
|
||||
struct cprof_tbl_s *slot; /* table slot */
|
||||
@@ -30,22 +30,22 @@ struct stack_s { /* stack entry */
|
||||
u64_t start_2; /* count @ end of procentry */
|
||||
u64_t spent_deeper; /* spent in called functions */
|
||||
};
|
||||
PRIVATE struct stack_s cprof_stk[CPROF_STACK_SIZE]; /* stack */
|
||||
PRIVATE int cprof_stk_top; /* top of stack */
|
||||
static struct stack_s cprof_stk[CPROF_STACK_SIZE]; /* stack */
|
||||
static int cprof_stk_top; /* top of stack */
|
||||
EXTERN struct cprof_tbl_s cprof_tbl[]; /* hash table */
|
||||
PRIVATE int cprof_tbl_size; /* nr of slots */
|
||||
PRIVATE struct cprof_tbl_s *idx[CPROF_INDEX_SIZE]; /* index to table */
|
||||
PRIVATE struct cprof_ctl_s control; /* for comms with kernel */
|
||||
PRIVATE int cprof_announce; /* announce on n-th execution
|
||||
static int cprof_tbl_size; /* nr of slots */
|
||||
static struct cprof_tbl_s *idx[CPROF_INDEX_SIZE]; /* index to table */
|
||||
static struct cprof_ctl_s control; /* for comms with kernel */
|
||||
static int cprof_announce; /* announce on n-th execution
|
||||
* of procentry */
|
||||
PRIVATE int cprof_locked; /* for reentrancy */
|
||||
static int cprof_locked; /* for reentrancy */
|
||||
|
||||
FORWARD void cprof_init(void);
|
||||
FORWARD void reset(void);
|
||||
FORWARD void clear_tbl(void);
|
||||
static void cprof_init(void);
|
||||
static void reset(void);
|
||||
static void clear_tbl(void);
|
||||
|
||||
|
||||
PUBLIC void procentry (char *name)
|
||||
void procentry (char *name)
|
||||
{
|
||||
static int init = 0;
|
||||
unsigned hash = 0, x = 0;
|
||||
@@ -168,7 +168,7 @@ PUBLIC void procentry (char *name)
|
||||
}
|
||||
|
||||
|
||||
PUBLIC void procexit (char *UNUSED(name))
|
||||
void procexit (char *UNUSED(name))
|
||||
{
|
||||
u64_t stop, spent;
|
||||
u32_t tsc_lo, tsc_hi;
|
||||
@@ -226,7 +226,7 @@ PUBLIC void procexit (char *UNUSED(name))
|
||||
}
|
||||
|
||||
|
||||
PRIVATE void cprof_init()
|
||||
static void cprof_init()
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -249,14 +249,14 @@ PRIVATE void cprof_init()
|
||||
}
|
||||
|
||||
|
||||
PRIVATE void reset()
|
||||
static void reset()
|
||||
{
|
||||
clear_tbl();
|
||||
control.reset = 0;
|
||||
}
|
||||
|
||||
|
||||
PRIVATE void clear_tbl()
|
||||
static void clear_tbl()
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
struct cprof_tbl_s cprof_tbl[CPROF_TABLE_SIZE_OTHER];
|
||||
|
||||
/* Function that returns table size. */
|
||||
PUBLIC int profile_get_tbl_size(void)
|
||||
int profile_get_tbl_size(void)
|
||||
{
|
||||
return CPROF_TABLE_SIZE_OTHER;
|
||||
}
|
||||
|
||||
/* Function that returns on which execution of procentry to announce. */
|
||||
PUBLIC int profile_get_announce(void)
|
||||
int profile_get_announce(void)
|
||||
{
|
||||
return CPROF_ANNOUNCE_OTHER;
|
||||
}
|
||||
@@ -35,7 +35,7 @@ PUBLIC int profile_get_announce(void)
|
||||
* Userspace processes announce their control struct and table locations
|
||||
* to the kernel through this function.
|
||||
*/
|
||||
PUBLIC void profile_register(ctl_ptr, tbl_ptr)
|
||||
void profile_register(ctl_ptr, tbl_ptr)
|
||||
void *ctl_ptr;
|
||||
void *tbl_ptr;
|
||||
{
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
}
|
||||
|
||||
#define NR_STATIC_GRANTS 2
|
||||
PRIVATE cp_grant_t static_grants[NR_STATIC_GRANTS];
|
||||
PRIVATE cp_grant_t *grants = NULL;
|
||||
PRIVATE int ngrants = 0;
|
||||
static cp_grant_t static_grants[NR_STATIC_GRANTS];
|
||||
static cp_grant_t *grants = NULL;
|
||||
static int ngrants = 0;
|
||||
|
||||
PRIVATE void
|
||||
static void
|
||||
cpf_grow(void)
|
||||
{
|
||||
/* Grow the grants table if possible. */
|
||||
@@ -92,7 +92,7 @@ cpf_grow(void)
|
||||
ngrants = new_size;
|
||||
}
|
||||
|
||||
PRIVATE cp_grant_id_t
|
||||
static cp_grant_id_t
|
||||
cpf_new_grantslot(void)
|
||||
{
|
||||
/* Find a new, free grant slot in the grant table, grow it if
|
||||
@@ -129,7 +129,7 @@ cpf_new_grantslot(void)
|
||||
return g;
|
||||
}
|
||||
|
||||
PUBLIC cp_grant_id_t
|
||||
cp_grant_id_t
|
||||
cpf_grant_direct(endpoint_t who_to, vir_bytes addr, size_t bytes, int access)
|
||||
{
|
||||
cp_grant_id_t g;
|
||||
@@ -152,7 +152,7 @@ cpf_grant_direct(endpoint_t who_to, vir_bytes addr, size_t bytes, int access)
|
||||
return g;
|
||||
}
|
||||
|
||||
PUBLIC cp_grant_id_t
|
||||
cp_grant_id_t
|
||||
cpf_grant_indirect(endpoint_t who_to, endpoint_t who_from, cp_grant_id_t gr)
|
||||
{
|
||||
/* Grant process A access into process B. B has granted us access as grant
|
||||
@@ -180,7 +180,7 @@ cpf_grant_indirect(endpoint_t who_to, endpoint_t who_from, cp_grant_id_t gr)
|
||||
return g;
|
||||
}
|
||||
|
||||
PUBLIC cp_grant_id_t
|
||||
cp_grant_id_t
|
||||
cpf_grant_magic(endpoint_t who_to, endpoint_t who_from,
|
||||
vir_bytes addr, size_t bytes, int access)
|
||||
{
|
||||
@@ -209,7 +209,7 @@ cpf_grant_magic(endpoint_t who_to, endpoint_t who_from,
|
||||
return g;
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
int
|
||||
cpf_revoke(cp_grant_id_t g)
|
||||
{
|
||||
/* Revoke previously granted access, identified by grant id. */
|
||||
@@ -231,7 +231,7 @@ cpf_revoke(cp_grant_id_t g)
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
int
|
||||
cpf_lookup(cp_grant_id_t g, endpoint_t *granter, endpoint_t *grantee)
|
||||
{
|
||||
/* First check slot validity, and if it's in use currently. */
|
||||
@@ -248,7 +248,7 @@ cpf_lookup(cp_grant_id_t g, endpoint_t *granter, endpoint_t *grantee)
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
int
|
||||
cpf_getgrants(cp_grant_id_t *grant_ids, int n)
|
||||
{
|
||||
int i;
|
||||
@@ -263,7 +263,7 @@ cpf_getgrants(cp_grant_id_t *grant_ids, int n)
|
||||
return i;
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
int
|
||||
cpf_setgrant_direct(gid, who, addr, bytes, access)
|
||||
cp_grant_id_t gid;
|
||||
endpoint_t who;
|
||||
@@ -288,7 +288,7 @@ int access;
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
int
|
||||
cpf_setgrant_indirect(gid, who_to, who_from, his_gid)
|
||||
cp_grant_id_t gid;
|
||||
endpoint_t who_to, who_from;
|
||||
@@ -305,7 +305,7 @@ cp_grant_id_t his_gid;
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
int
|
||||
cpf_setgrant_magic(gid, who_to, who_from, addr, bytes, access)
|
||||
cp_grant_id_t gid;
|
||||
endpoint_t who_to, who_from;
|
||||
@@ -331,7 +331,7 @@ int access;
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC int
|
||||
int
|
||||
cpf_setgrant_disable(gid)
|
||||
cp_grant_id_t gid;
|
||||
{
|
||||
@@ -343,7 +343,7 @@ cp_grant_id_t gid;
|
||||
return 0;
|
||||
}
|
||||
|
||||
PUBLIC void
|
||||
void
|
||||
cpf_reload(void)
|
||||
{
|
||||
/* Inform the kernel about the location of the grant table. This is needed
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/*===========================================================================*
|
||||
* sched_inherit *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sched_inherit(endpoint_t scheduler_e,
|
||||
int sched_inherit(endpoint_t scheduler_e,
|
||||
endpoint_t schedulee_e, endpoint_t parent_e, unsigned maxprio,
|
||||
endpoint_t *newscheduler_e)
|
||||
{
|
||||
@@ -46,7 +46,7 @@ PUBLIC int sched_inherit(endpoint_t scheduler_e,
|
||||
/*===========================================================================*
|
||||
* sched_start *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sched_start(endpoint_t scheduler_e,
|
||||
int sched_start(endpoint_t scheduler_e,
|
||||
endpoint_t schedulee_e,
|
||||
endpoint_t parent_e,
|
||||
int maxprio,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/*===========================================================================*
|
||||
* sched_stop *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sched_stop(endpoint_t scheduler_e, endpoint_t schedulee_e)
|
||||
int sched_stop(endpoint_t scheduler_e, endpoint_t schedulee_e)
|
||||
{
|
||||
int rv;
|
||||
message m;
|
||||
|
||||
@@ -8,21 +8,21 @@
|
||||
|
||||
/* Self variables. */
|
||||
#define SEF_SELF_NAME_MAXLEN 20
|
||||
PUBLIC char sef_self_name[SEF_SELF_NAME_MAXLEN];
|
||||
PUBLIC endpoint_t sef_self_endpoint;
|
||||
PUBLIC int sef_self_priv_flags;
|
||||
PUBLIC int sef_self_first_receive_done;
|
||||
char sef_self_name[SEF_SELF_NAME_MAXLEN];
|
||||
endpoint_t sef_self_endpoint;
|
||||
int sef_self_priv_flags;
|
||||
int sef_self_first_receive_done;
|
||||
|
||||
/* Debug. */
|
||||
#if SEF_INIT_DEBUG || SEF_LU_DEBUG || SEF_PING_DEBUG || SEF_SIGNAL_DEBUG
|
||||
#define SEF_DEBUG_HEADER_MAXLEN 32
|
||||
PRIVATE time_t sef_debug_boottime = 0;
|
||||
PRIVATE u32_t sef_debug_system_hz = 0;
|
||||
PRIVATE time_t sef_debug_time_sec = 0;
|
||||
PRIVATE time_t sef_debug_time_us = 0;
|
||||
PRIVATE char sef_debug_header_buff[SEF_DEBUG_HEADER_MAXLEN];
|
||||
FORWARD void sef_debug_refresh_params(void);
|
||||
PUBLIC char* sef_debug_header(void);
|
||||
static time_t sef_debug_boottime = 0;
|
||||
static u32_t sef_debug_system_hz = 0;
|
||||
static time_t sef_debug_time_sec = 0;
|
||||
static time_t sef_debug_time_us = 0;
|
||||
static char sef_debug_header_buff[SEF_DEBUG_HEADER_MAXLEN];
|
||||
static void sef_debug_refresh_params(void);
|
||||
char* sef_debug_header(void);
|
||||
#endif
|
||||
|
||||
/* SEF Init prototypes. */
|
||||
@@ -45,7 +45,7 @@ EXTERN int do_sef_signal_request(message *m_ptr);
|
||||
/*===========================================================================*
|
||||
* sef_startup *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_startup()
|
||||
void sef_startup()
|
||||
{
|
||||
/* SEF startup interface for system services. */
|
||||
int r, status;
|
||||
@@ -114,7 +114,7 @@ PUBLIC void sef_startup()
|
||||
/*===========================================================================*
|
||||
* sef_receive_status *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_receive_status(endpoint_t src, message *m_ptr, int *status_ptr)
|
||||
int sef_receive_status(endpoint_t src, message *m_ptr, int *status_ptr)
|
||||
{
|
||||
/* SEF receive() interface for system services. */
|
||||
int r, status;
|
||||
@@ -183,7 +183,7 @@ PUBLIC int sef_receive_status(endpoint_t src, message *m_ptr, int *status_ptr)
|
||||
/*===========================================================================*
|
||||
* sef_exit *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_exit(int status)
|
||||
void sef_exit(int status)
|
||||
{
|
||||
/* System services use a special version of exit() that generates a
|
||||
* self-termination signal.
|
||||
@@ -205,7 +205,7 @@ PUBLIC void sef_exit(int status)
|
||||
/*===========================================================================*
|
||||
* _exit *
|
||||
*===========================================================================*/
|
||||
PUBLIC void _exit(int status)
|
||||
void _exit(int status)
|
||||
{
|
||||
/* Make exit() an alias for sef_exit() for system services. */
|
||||
sef_exit(status);
|
||||
@@ -215,7 +215,7 @@ PUBLIC void _exit(int status)
|
||||
/*===========================================================================*
|
||||
* __exit *
|
||||
*===========================================================================*/
|
||||
PUBLIC void __exit(int status)
|
||||
void __exit(int status)
|
||||
{
|
||||
/* Make exit() an alias for sef_exit() for system services. */
|
||||
sef_exit(status);
|
||||
@@ -226,7 +226,7 @@ PUBLIC void __exit(int status)
|
||||
/*===========================================================================*
|
||||
* sef_debug_refresh_params *
|
||||
*===========================================================================*/
|
||||
PRIVATE void sef_debug_refresh_params(void)
|
||||
static void sef_debug_refresh_params(void)
|
||||
{
|
||||
/* Refresh SEF debug params. */
|
||||
clock_t uptime;
|
||||
@@ -274,7 +274,7 @@ PRIVATE void sef_debug_refresh_params(void)
|
||||
/*===========================================================================*
|
||||
* sef_debug_header *
|
||||
*===========================================================================*/
|
||||
PUBLIC char* sef_debug_header(void)
|
||||
char* sef_debug_header(void)
|
||||
{
|
||||
/* Build and return a SEF debug header. */
|
||||
sef_debug_refresh_params();
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
#include <minix/sysutil.h>
|
||||
#include <minix/gcov.h>
|
||||
|
||||
PRIVATE sef_cb_gcov_t sef_cb_gcov = do_gcov_flush_impl;
|
||||
static sef_cb_gcov_t sef_cb_gcov = do_gcov_flush_impl;
|
||||
|
||||
/*===========================================================================*
|
||||
* do_sef_gcov_request *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_sef_gcov_request(message *m_ptr)
|
||||
int do_sef_gcov_request(message *m_ptr)
|
||||
{
|
||||
if(!sef_cb_gcov)
|
||||
return ENOSYS;
|
||||
@@ -22,7 +22,7 @@ PUBLIC int do_sef_gcov_request(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_gcov *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_gcov(sef_cb_gcov_t cb)
|
||||
void sef_setcb_gcov(sef_cb_gcov_t cb)
|
||||
{
|
||||
sef_cb_gcov = cb;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <minix/sysutil.h>
|
||||
|
||||
/* SEF Init callbacks. */
|
||||
PRIVATE struct sef_cbs {
|
||||
static struct sef_cbs {
|
||||
sef_cb_init_t sef_cb_init_fresh;
|
||||
sef_cb_init_t sef_cb_init_lu;
|
||||
sef_cb_init_t sef_cb_init_restart;
|
||||
@@ -17,8 +17,8 @@ PRIVATE struct sef_cbs {
|
||||
};
|
||||
|
||||
/* SEF Init prototypes for sef_startup(). */
|
||||
PUBLIC int do_sef_rs_init(endpoint_t old_endpoint);
|
||||
PUBLIC int do_sef_init_request(message *m_ptr);
|
||||
int do_sef_rs_init(endpoint_t old_endpoint);
|
||||
int do_sef_init_request(message *m_ptr);
|
||||
|
||||
/* Debug. */
|
||||
EXTERN char* sef_debug_header(void);
|
||||
@@ -30,7 +30,7 @@ EXTERN endpoint_t sef_self_priv_flags;
|
||||
/*===========================================================================*
|
||||
* process_init *
|
||||
*===========================================================================*/
|
||||
PRIVATE int process_init(int type, sef_init_info_t *info)
|
||||
static int process_init(int type, sef_init_info_t *info)
|
||||
{
|
||||
/* Process initialization. */
|
||||
int r, result;
|
||||
@@ -73,7 +73,7 @@ PRIVATE int process_init(int type, sef_init_info_t *info)
|
||||
/*===========================================================================*
|
||||
* do_sef_rs_init *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_sef_rs_init(endpoint_t old_endpoint)
|
||||
int do_sef_rs_init(endpoint_t old_endpoint)
|
||||
{
|
||||
/* Special SEF Init for RS. */
|
||||
int r;
|
||||
@@ -101,7 +101,7 @@ PUBLIC int do_sef_rs_init(endpoint_t old_endpoint)
|
||||
/*===========================================================================*
|
||||
* do_sef_init_request *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_sef_init_request(message *m_ptr)
|
||||
int do_sef_init_request(message *m_ptr)
|
||||
{
|
||||
/* Handle a SEF Init request. */
|
||||
int r;
|
||||
@@ -123,7 +123,7 @@ PUBLIC int do_sef_init_request(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_init_fresh *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_init_fresh(sef_cb_init_t cb)
|
||||
void sef_setcb_init_fresh(sef_cb_init_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_init_fresh = cb;
|
||||
@@ -132,7 +132,7 @@ PUBLIC void sef_setcb_init_fresh(sef_cb_init_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_init_lu *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_init_lu(sef_cb_init_t cb)
|
||||
void sef_setcb_init_lu(sef_cb_init_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_init_lu = cb;
|
||||
@@ -141,7 +141,7 @@ PUBLIC void sef_setcb_init_lu(sef_cb_init_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_init_restart *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_init_restart(sef_cb_init_t cb)
|
||||
void sef_setcb_init_restart(sef_cb_init_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_init_restart = cb;
|
||||
@@ -150,7 +150,7 @@ PUBLIC void sef_setcb_init_restart(sef_cb_init_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_init_response *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_init_response(sef_cb_init_response_t cb)
|
||||
void sef_setcb_init_response(sef_cb_init_response_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_init_response = cb;
|
||||
@@ -159,7 +159,7 @@ PUBLIC void sef_setcb_init_response(sef_cb_init_response_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_cb_init_null *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_init_null(int UNUSED(type),
|
||||
int sef_cb_init_null(int UNUSED(type),
|
||||
sef_init_info_t *UNUSED(info))
|
||||
{
|
||||
return OK;
|
||||
@@ -168,7 +168,7 @@ PUBLIC int sef_cb_init_null(int UNUSED(type),
|
||||
/*===========================================================================*
|
||||
* sef_cb_init_response_null *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_init_response_null(message * UNUSED(m_ptr))
|
||||
int sef_cb_init_response_null(message * UNUSED(m_ptr))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
@@ -176,7 +176,7 @@ PUBLIC int sef_cb_init_response_null(message * UNUSED(m_ptr))
|
||||
/*===========================================================================*
|
||||
* sef_cb_init_fail *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_init_fail(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
int sef_cb_init_fail(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ PUBLIC int sef_cb_init_fail(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
/*===========================================================================*
|
||||
* sef_cb_init_reset *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_init_reset(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
int sef_cb_init_reset(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
{
|
||||
/* Tell RS to reincarnate us, with no old resources, and a new endpoint. */
|
||||
return ERESTART;
|
||||
@@ -193,7 +193,7 @@ PUBLIC int sef_cb_init_reset(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
/*===========================================================================*
|
||||
* sef_cb_init_crash *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_init_crash(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
int sef_cb_init_crash(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
{
|
||||
panic("Simulating a crash at initialization time...");
|
||||
|
||||
@@ -203,7 +203,7 @@ PUBLIC int sef_cb_init_crash(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
/*===========================================================================*
|
||||
* sef_cb_init_response_rs_reply *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_init_response_rs_reply(message *m_ptr)
|
||||
int sef_cb_init_response_rs_reply(message *m_ptr)
|
||||
{
|
||||
int r;
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
#include <minix/sysutil.h>
|
||||
|
||||
/* SEF Live update variables. */
|
||||
PRIVATE int sef_lu_state;
|
||||
static int sef_lu_state;
|
||||
|
||||
/* SEF Live update callbacks. */
|
||||
PRIVATE struct sef_cbs {
|
||||
static struct sef_cbs {
|
||||
sef_cb_lu_prepare_t sef_cb_lu_prepare;
|
||||
sef_cb_lu_state_isvalid_t sef_cb_lu_state_isvalid;
|
||||
sef_cb_lu_state_changed_t sef_cb_lu_state_changed;
|
||||
@@ -23,15 +23,15 @@ PRIVATE struct sef_cbs {
|
||||
};
|
||||
|
||||
/* SEF Live update prototypes for sef_receive(). */
|
||||
PUBLIC void do_sef_lu_before_receive(void);
|
||||
PUBLIC int do_sef_lu_request(message *m_ptr);
|
||||
void do_sef_lu_before_receive(void);
|
||||
int do_sef_lu_request(message *m_ptr);
|
||||
|
||||
/* SEF Live update helpers. */
|
||||
PRIVATE void sef_lu_ready(int result);
|
||||
static void sef_lu_ready(int result);
|
||||
|
||||
/* Debug. */
|
||||
EXTERN char* sef_debug_header(void);
|
||||
PRIVATE int sef_lu_debug_cycle = 0;
|
||||
static int sef_lu_debug_cycle = 0;
|
||||
|
||||
/* Information about SELF. */
|
||||
EXTERN endpoint_t sef_self_endpoint;
|
||||
@@ -40,7 +40,7 @@ EXTERN int sef_self_first_receive_done;
|
||||
/*===========================================================================*
|
||||
* do_sef_lu_before_receive *
|
||||
*===========================================================================*/
|
||||
PUBLIC void do_sef_lu_before_receive()
|
||||
void do_sef_lu_before_receive()
|
||||
{
|
||||
/* Handle SEF Live update before receive events. */
|
||||
int r;
|
||||
@@ -80,7 +80,7 @@ PUBLIC void do_sef_lu_before_receive()
|
||||
/*===========================================================================*
|
||||
* do_sef_lu_request *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_sef_lu_request(message *m_ptr)
|
||||
int do_sef_lu_request(message *m_ptr)
|
||||
{
|
||||
/* Handle a SEF Live update request. */
|
||||
int state, old_state, is_valid_state;
|
||||
@@ -121,7 +121,7 @@ PUBLIC int do_sef_lu_request(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* sef_lu_ready *
|
||||
*===========================================================================*/
|
||||
PRIVATE void sef_lu_ready(int result)
|
||||
static void sef_lu_ready(int result)
|
||||
{
|
||||
message m;
|
||||
int old_state, r;
|
||||
@@ -177,7 +177,7 @@ PRIVATE void sef_lu_ready(int result)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_lu_prepare *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_lu_prepare(sef_cb_lu_prepare_t cb)
|
||||
void sef_setcb_lu_prepare(sef_cb_lu_prepare_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_lu_prepare = cb;
|
||||
@@ -186,7 +186,7 @@ PUBLIC void sef_setcb_lu_prepare(sef_cb_lu_prepare_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_lu_state_isvalid *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_lu_state_isvalid(sef_cb_lu_state_isvalid_t cb)
|
||||
void sef_setcb_lu_state_isvalid(sef_cb_lu_state_isvalid_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_lu_state_isvalid = cb;
|
||||
@@ -195,7 +195,7 @@ PUBLIC void sef_setcb_lu_state_isvalid(sef_cb_lu_state_isvalid_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_lu_state_changed *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_lu_state_changed(sef_cb_lu_state_changed_t cb)
|
||||
void sef_setcb_lu_state_changed(sef_cb_lu_state_changed_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_lu_state_changed = cb;
|
||||
@@ -204,7 +204,7 @@ PUBLIC void sef_setcb_lu_state_changed(sef_cb_lu_state_changed_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_lu_state_dump *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_lu_state_dump(sef_cb_lu_state_dump_t cb)
|
||||
void sef_setcb_lu_state_dump(sef_cb_lu_state_dump_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_lu_state_dump = cb;
|
||||
@@ -213,7 +213,7 @@ PUBLIC void sef_setcb_lu_state_dump(sef_cb_lu_state_dump_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_lu_state_save *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_lu_state_save(sef_cb_lu_state_save_t cb)
|
||||
void sef_setcb_lu_state_save(sef_cb_lu_state_save_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_lu_state_save = cb;
|
||||
@@ -222,7 +222,7 @@ PUBLIC void sef_setcb_lu_state_save(sef_cb_lu_state_save_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_lu_response *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_lu_response(sef_cb_lu_response_t cb)
|
||||
void sef_setcb_lu_response(sef_cb_lu_response_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_lu_response = cb;
|
||||
@@ -231,7 +231,7 @@ PUBLIC void sef_setcb_lu_response(sef_cb_lu_response_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_prepare_null *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_lu_prepare_null(int UNUSED(state))
|
||||
int sef_cb_lu_prepare_null(int UNUSED(state))
|
||||
{
|
||||
return ENOTREADY;
|
||||
}
|
||||
@@ -239,7 +239,7 @@ PUBLIC int sef_cb_lu_prepare_null(int UNUSED(state))
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_state_isvalid_null *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_lu_state_isvalid_null(int UNUSED(state))
|
||||
int sef_cb_lu_state_isvalid_null(int UNUSED(state))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -247,7 +247,7 @@ PUBLIC int sef_cb_lu_state_isvalid_null(int UNUSED(state))
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_state_changed_null *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_cb_lu_state_changed_null(int UNUSED(old_state),
|
||||
void sef_cb_lu_state_changed_null(int UNUSED(old_state),
|
||||
int UNUSED(state))
|
||||
{
|
||||
}
|
||||
@@ -255,7 +255,7 @@ PUBLIC void sef_cb_lu_state_changed_null(int UNUSED(old_state),
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_state_dump_null *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_cb_lu_state_dump_null(int UNUSED(state))
|
||||
void sef_cb_lu_state_dump_null(int UNUSED(state))
|
||||
{
|
||||
sef_lu_dprint("NULL\n");
|
||||
}
|
||||
@@ -263,7 +263,7 @@ PUBLIC void sef_cb_lu_state_dump_null(int UNUSED(state))
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_state_save_null *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_lu_state_save_null(int UNUSED(result))
|
||||
int sef_cb_lu_state_save_null(int UNUSED(result))
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
@@ -271,7 +271,7 @@ PUBLIC int sef_cb_lu_state_save_null(int UNUSED(result))
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_response_null *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_lu_response_null(message * UNUSED(m_ptr))
|
||||
int sef_cb_lu_response_null(message * UNUSED(m_ptr))
|
||||
{
|
||||
return ENOSYS;
|
||||
}
|
||||
@@ -279,7 +279,7 @@ PUBLIC int sef_cb_lu_response_null(message * UNUSED(m_ptr))
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_prepare_always_ready *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_lu_prepare_always_ready(int UNUSED(state))
|
||||
int sef_cb_lu_prepare_always_ready(int UNUSED(state))
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
@@ -287,7 +287,7 @@ PUBLIC int sef_cb_lu_prepare_always_ready(int UNUSED(state))
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_prepare_never_ready *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_lu_prepare_never_ready(int UNUSED(state))
|
||||
int sef_cb_lu_prepare_never_ready(int UNUSED(state))
|
||||
{
|
||||
#if SEF_LU_DEBUG
|
||||
sef_lu_debug_begin();
|
||||
@@ -302,7 +302,7 @@ PUBLIC int sef_cb_lu_prepare_never_ready(int UNUSED(state))
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_prepare_crash *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_lu_prepare_crash(int UNUSED(state))
|
||||
int sef_cb_lu_prepare_crash(int UNUSED(state))
|
||||
{
|
||||
panic("Simulating a crash at update prepare time...");
|
||||
|
||||
@@ -312,7 +312,7 @@ PUBLIC int sef_cb_lu_prepare_crash(int UNUSED(state))
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_state_isvalid_standard *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_lu_state_isvalid_standard(int state)
|
||||
int sef_cb_lu_state_isvalid_standard(int state)
|
||||
{
|
||||
return SEF_LU_STATE_IS_STANDARD(state);
|
||||
}
|
||||
@@ -320,7 +320,7 @@ PUBLIC int sef_cb_lu_state_isvalid_standard(int state)
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_state_isvalid_workfree *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_lu_state_isvalid_workfree(int state)
|
||||
int sef_cb_lu_state_isvalid_workfree(int state)
|
||||
{
|
||||
return (state == SEF_LU_STATE_WORK_FREE);
|
||||
}
|
||||
@@ -328,7 +328,7 @@ PUBLIC int sef_cb_lu_state_isvalid_workfree(int state)
|
||||
/*===========================================================================*
|
||||
* sef_cb_lu_response_rs_reply *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_lu_response_rs_reply(message *m_ptr)
|
||||
int sef_cb_lu_response_rs_reply(message *m_ptr)
|
||||
{
|
||||
int r;
|
||||
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
#include <minix/sysutil.h>
|
||||
|
||||
/* SEF Ping callbacks. */
|
||||
PRIVATE struct sef_cbs {
|
||||
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(). */
|
||||
PUBLIC int do_sef_ping_request(message *m_ptr);
|
||||
int do_sef_ping_request(message *m_ptr);
|
||||
|
||||
/* Debug. */
|
||||
EXTERN char* sef_debug_header(void);
|
||||
@@ -18,7 +18,7 @@ EXTERN char* sef_debug_header(void);
|
||||
/*===========================================================================*
|
||||
* do_sef_ping_request *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_sef_ping_request(message *m_ptr)
|
||||
int do_sef_ping_request(message *m_ptr)
|
||||
{
|
||||
/* Handle a SEF Ping request. */
|
||||
|
||||
@@ -40,7 +40,7 @@ PUBLIC int do_sef_ping_request(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_ping_reply *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_ping_reply(sef_cb_ping_reply_t cb)
|
||||
void sef_setcb_ping_reply(sef_cb_ping_reply_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_ping_reply = cb;
|
||||
@@ -49,14 +49,14 @@ PUBLIC void sef_setcb_ping_reply(sef_cb_ping_reply_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_cb_ping_reply_null *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_cb_ping_reply_null(endpoint_t UNUSED(source))
|
||||
void sef_cb_ping_reply_null(endpoint_t UNUSED(source))
|
||||
{
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* sef_cb_ping_reply_pong *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_cb_ping_reply_pong(endpoint_t source)
|
||||
void sef_cb_ping_reply_pong(endpoint_t source)
|
||||
{
|
||||
notify(source);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <minix/sysutil.h>
|
||||
|
||||
/* SEF Signal callbacks. */
|
||||
PRIVATE struct sef_cbs {
|
||||
static struct sef_cbs {
|
||||
sef_cb_signal_handler_t sef_cb_signal_handler;
|
||||
sef_cb_signal_manager_t sef_cb_signal_manager;
|
||||
} sef_cbs = {
|
||||
@@ -13,7 +13,7 @@ PRIVATE struct sef_cbs {
|
||||
};
|
||||
|
||||
/* SEF Signal prototypes for sef_receive(). */
|
||||
PUBLIC int do_sef_signal_request(message *m_ptr);
|
||||
int do_sef_signal_request(message *m_ptr);
|
||||
|
||||
/* Debug. */
|
||||
EXTERN char* sef_debug_header(void);
|
||||
@@ -24,7 +24,7 @@ EXTERN endpoint_t sef_self_endpoint;
|
||||
/*===========================================================================*
|
||||
* process_sigmgr_signals *
|
||||
*===========================================================================*/
|
||||
PRIVATE void process_sigmgr_signals(void)
|
||||
static void process_sigmgr_signals(void)
|
||||
{
|
||||
/* A signal manager has pending signals in the kernel. Process them. */
|
||||
endpoint_t target;
|
||||
@@ -65,7 +65,7 @@ PRIVATE void process_sigmgr_signals(void)
|
||||
/*===========================================================================*
|
||||
* process_sigmgr_self_signals *
|
||||
*===========================================================================*/
|
||||
PRIVATE void process_sigmgr_self_signals(sigset_t sigset)
|
||||
static void process_sigmgr_self_signals(sigset_t sigset)
|
||||
{
|
||||
/* A signal manager has pending signals for itself. Process them. */
|
||||
int signo;
|
||||
@@ -81,7 +81,7 @@ PRIVATE void process_sigmgr_self_signals(sigset_t sigset)
|
||||
/*===========================================================================*
|
||||
* do_sef_signal_request *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_sef_signal_request(message *m_ptr)
|
||||
int do_sef_signal_request(message *m_ptr)
|
||||
{
|
||||
/* Handle a SEF Signal request. */
|
||||
int signo;
|
||||
@@ -129,7 +129,7 @@ PUBLIC int do_sef_signal_request(message *m_ptr)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_signal_handler *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_signal_handler(sef_cb_signal_handler_t cb)
|
||||
void sef_setcb_signal_handler(sef_cb_signal_handler_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_signal_handler = cb;
|
||||
@@ -138,7 +138,7 @@ PUBLIC void sef_setcb_signal_handler(sef_cb_signal_handler_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_setcb_signal_manager *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_setcb_signal_manager(sef_cb_signal_manager_t cb)
|
||||
void sef_setcb_signal_manager(sef_cb_signal_manager_t cb)
|
||||
{
|
||||
assert(cb != NULL);
|
||||
sef_cbs.sef_cb_signal_manager = cb;
|
||||
@@ -147,14 +147,14 @@ PUBLIC void sef_setcb_signal_manager(sef_cb_signal_manager_t cb)
|
||||
/*===========================================================================*
|
||||
* sef_cb_signal_handler_null *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_cb_signal_handler_null(int signo)
|
||||
void sef_cb_signal_handler_null(int signo)
|
||||
{
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* sef_cb_signal_manager_null *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sef_cb_signal_manager_null(endpoint_t target, int signo)
|
||||
int sef_cb_signal_manager_null(endpoint_t target, int signo)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ PUBLIC int sef_cb_signal_manager_null(endpoint_t target, int signo)
|
||||
/*===========================================================================*
|
||||
* sef_cb_signal_handler_term *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_cb_signal_handler_term(int signo)
|
||||
void sef_cb_signal_handler_term(int signo)
|
||||
{
|
||||
/* Terminate in case of SIGTERM, ignore other signals. */
|
||||
if(signo == SIGTERM) {
|
||||
@@ -173,7 +173,7 @@ PUBLIC void sef_cb_signal_handler_term(int signo)
|
||||
/*===========================================================================*
|
||||
* sef_cb_signal_handler_posix_default *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sef_cb_signal_handler_posix_default(int signo)
|
||||
void sef_cb_signal_handler_posix_default(int signo)
|
||||
{
|
||||
switch(signo) {
|
||||
/* Ignore when possible. */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
/*===========================================================================*
|
||||
* ser_putc *
|
||||
*===========================================================================*/
|
||||
PUBLIC void ser_putc(char c)
|
||||
void ser_putc(char c)
|
||||
{
|
||||
u32_t b;
|
||||
int i;
|
||||
|
||||
@@ -28,7 +28,7 @@ enum {
|
||||
STATE_UPTIME /* use the clock to spin */
|
||||
};
|
||||
|
||||
PUBLIC void spin_init(spin_t *s, u32_t usecs)
|
||||
void spin_init(spin_t *s, u32_t usecs)
|
||||
{
|
||||
/* Initialize the given spin state structure, set to spin at most the
|
||||
* given number of microseconds.
|
||||
@@ -38,7 +38,7 @@ PUBLIC void spin_init(spin_t *s, u32_t usecs)
|
||||
s->s_timeout = FALSE;
|
||||
}
|
||||
|
||||
PUBLIC int spin_check(spin_t *s)
|
||||
int spin_check(spin_t *s)
|
||||
{
|
||||
/* Check whether a timeout has taken place. Return TRUE if the caller
|
||||
* should continue spinning, and FALSE if a timeout has occurred. The
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
|
||||
PUBLIC int sys_abort(int how, ...)
|
||||
int sys_abort(int how, ...)
|
||||
{
|
||||
/* Something awful has happened. Abandon ship. */
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_clear *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_clear(proc_ep)
|
||||
int sys_clear(proc_ep)
|
||||
endpoint_t proc_ep; /* which process has exited */
|
||||
{
|
||||
/* A process has exited. PM tells the kernel.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_cprof *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_cprof(action, size, endpt, ctl_ptr, mem_ptr)
|
||||
int sys_cprof(action, size, endpt, ctl_ptr, mem_ptr)
|
||||
int action; /* get/reset profiling tables */
|
||||
int size; /* size of allocated memory */
|
||||
endpoint_t endpt; /* caller endpoint */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_endksig *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_endksig(proc_ep)
|
||||
int sys_endksig(proc_ep)
|
||||
endpoint_t proc_ep; /* process number */
|
||||
{
|
||||
message m;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_enable_iop *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_enable_iop(proc_ep)
|
||||
int sys_enable_iop(proc_ep)
|
||||
endpoint_t proc_ep; /* number of process to allow I/O */
|
||||
{
|
||||
message m_iop;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_exec(proc_ep, ptr, prog_name, initpc)
|
||||
int sys_exec(proc_ep, ptr, prog_name, initpc)
|
||||
endpoint_t proc_ep; /* process that did exec */
|
||||
char *ptr; /* new stack pointer */
|
||||
char *prog_name; /* name of the new program */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_exit *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_exit()
|
||||
int sys_exit()
|
||||
{
|
||||
/* A system process requests to exit. */
|
||||
message m;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_fork(parent, child, child_endpoint, map_ptr, flags, msgaddr)
|
||||
int sys_fork(parent, child, child_endpoint, map_ptr, flags, msgaddr)
|
||||
endpoint_t parent; /* process doing the fork */
|
||||
endpoint_t child; /* which proc has been created by the fork */
|
||||
endpoint_t *child_endpoint;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_getinfo *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_getinfo(request, ptr, len, ptr2, len2)
|
||||
int sys_getinfo(request, ptr, len, ptr2, len2)
|
||||
int request; /* system info requested */
|
||||
void *ptr; /* pointer where to store it */
|
||||
int len; /* max length of value to get */
|
||||
@@ -28,7 +28,7 @@ int len2; /* length or process nr */
|
||||
/*===========================================================================*
|
||||
* sys_whoami *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_whoami(endpoint_t *who_ep, char *who_name, int len,
|
||||
int sys_whoami(endpoint_t *who_ep, char *who_name, int len,
|
||||
int *priv_flags)
|
||||
{
|
||||
message m;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_getksig *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_getksig(proc_ep, k_sig_map)
|
||||
int sys_getksig(proc_ep, k_sig_map)
|
||||
endpoint_t *proc_ep; /* return process number here */
|
||||
sigset_t *k_sig_map; /* return signal map here */
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_in *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_in(port, value, type)
|
||||
int sys_in(port, value, type)
|
||||
int port; /* port address to read from */
|
||||
u32_t *value; /* pointer where to store value */
|
||||
int type; /* byte, word, long */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_int86 *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_int86(reg86p)
|
||||
int sys_int86(reg86p)
|
||||
struct reg86u *reg86p;
|
||||
{
|
||||
message m;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_irqctl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_irqctl(req, irq_vec, policy, hook_id)
|
||||
int sys_irqctl(req, irq_vec, policy, hook_id)
|
||||
int req; /* IRQ control request */
|
||||
int irq_vec; /* IRQ vector to control */
|
||||
int policy; /* bit mask for policy flags */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_kill(proc_ep, signr)
|
||||
int sys_kill(proc_ep, signr)
|
||||
endpoint_t proc_ep; /* which proc_ep has exited */
|
||||
int signr; /* signal number: 1 - 16 */
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_getmcontext(proc, mcp)
|
||||
int sys_getmcontext(proc, mcp)
|
||||
endpoint_t proc; /* process retrieving context */
|
||||
mcontext_t *mcp; /* where to store context */
|
||||
{
|
||||
@@ -15,7 +15,7 @@ mcontext_t *mcp; /* where to store context */
|
||||
return r;
|
||||
}
|
||||
|
||||
PUBLIC int sys_setmcontext(proc, mcp)
|
||||
int sys_setmcontext(proc, mcp)
|
||||
endpoint_t proc; /* process setting context */
|
||||
mcontext_t *mcp; /* where to get context from */
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_memset(unsigned long pattern, phys_bytes base, phys_bytes bytes)
|
||||
int sys_memset(unsigned long pattern, phys_bytes base, phys_bytes bytes)
|
||||
{
|
||||
/* Zero a block of data. */
|
||||
message mess;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_newmap(
|
||||
int sys_newmap(
|
||||
endpoint_t proc_ep, /* process whose map is to be changed */
|
||||
struct mem_map *ptr /* pointer to new map */
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_out *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_out(port, value, type)
|
||||
int sys_out(port, value, type)
|
||||
int port; /* port address to write to */
|
||||
u32_t value; /* value to write */
|
||||
int type; /* byte, word, long */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_physcopy(src_proc, src_seg, src_vir,
|
||||
int sys_physcopy(src_proc, src_seg, src_vir,
|
||||
dst_proc, dst_seg, dst_vir, bytes)
|
||||
endpoint_t src_proc; /* source process */
|
||||
int src_seg; /* source memory segment */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_profbuf *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_profbuf(ctl_ptr, mem_ptr)
|
||||
int sys_profbuf(ctl_ptr, mem_ptr)
|
||||
void *ctl_ptr; /* pointer to control structure */
|
||||
void *mem_ptr; /* pointer to profiling table */
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_readbios(address, buf, size)
|
||||
int sys_readbios(address, buf, size)
|
||||
phys_bytes address; /* Absolute memory address */
|
||||
void *buf; /* Buffer to store the results */
|
||||
size_t size; /* Amount of data to read */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_runctl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_runctl(endpoint_t proc_ep, int action, int flags)
|
||||
int sys_runctl(endpoint_t proc_ep, int action, int flags)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <minix/safecopies.h>
|
||||
|
||||
PUBLIC int sys_safecopyfrom(endpoint_t src_e,
|
||||
int sys_safecopyfrom(endpoint_t src_e,
|
||||
cp_grant_id_t gr_id, vir_bytes offset,
|
||||
vir_bytes address, size_t bytes,
|
||||
int my_seg)
|
||||
@@ -25,7 +25,7 @@ PUBLIC int sys_safecopyfrom(endpoint_t src_e,
|
||||
|
||||
}
|
||||
|
||||
PUBLIC int sys_safecopyto(endpoint_t dst_e,
|
||||
int sys_safecopyto(endpoint_t dst_e,
|
||||
cp_grant_id_t gr_id, vir_bytes offset,
|
||||
vir_bytes address, size_t bytes,
|
||||
int my_seg)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_safemap *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_safemap(endpoint_t grantor, cp_grant_id_t grant,
|
||||
int sys_safemap(endpoint_t grantor, cp_grant_id_t grant,
|
||||
vir_bytes grant_offset, vir_bytes my_address,
|
||||
size_t bytes, int my_seg, int writable)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ PUBLIC int sys_safemap(endpoint_t grantor, cp_grant_id_t grant,
|
||||
/*===========================================================================*
|
||||
* sys_saferevmap_gid *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_saferevmap_gid(cp_grant_id_t grant)
|
||||
int sys_saferevmap_gid(cp_grant_id_t grant)
|
||||
{
|
||||
/* Grantor revokes safemap by grant id. */
|
||||
message copy_mess;
|
||||
@@ -45,7 +45,7 @@ PUBLIC int sys_saferevmap_gid(cp_grant_id_t grant)
|
||||
/*===========================================================================*
|
||||
* sys_saferevmap_addr *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_saferevmap_addr(vir_bytes addr)
|
||||
int sys_saferevmap_addr(vir_bytes addr)
|
||||
{
|
||||
/* Grantor revokes safemap by address. */
|
||||
message copy_mess;
|
||||
@@ -59,7 +59,7 @@ PUBLIC int sys_saferevmap_addr(vir_bytes addr)
|
||||
/*===========================================================================*
|
||||
* sys_safeunmap *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_safeunmap(int my_seg, vir_bytes my_address)
|
||||
int sys_safeunmap(int my_seg, vir_bytes my_address)
|
||||
{
|
||||
/* Requestor unmaps safemap. */
|
||||
message copy_mess;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_schedctl(unsigned flags,
|
||||
int sys_schedctl(unsigned flags,
|
||||
endpoint_t proc_ep,
|
||||
int priority,
|
||||
int quantum,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_schedule(endpoint_t proc_ep,
|
||||
int sys_schedule(endpoint_t proc_ep,
|
||||
int priority,
|
||||
int quantum,
|
||||
int cpu)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_sdevio *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_sdevio(req, port, proc_nr, buffer, count, offset)
|
||||
int sys_sdevio(req, port, proc_nr, buffer, count, offset)
|
||||
int req; /* request: DIO_{IN,OUT}PUT_* */
|
||||
long port; /* port address to read from */
|
||||
endpoint_t proc_nr; /* process where buffer is */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_setalarm *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_setalarm(exp_time, abs_time)
|
||||
int sys_setalarm(exp_time, abs_time)
|
||||
clock_t exp_time; /* expiration time for the alarm */
|
||||
int abs_time; /* use absolute or relative expiration time */
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_sigreturn *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_sigreturn(proc_ep, sig_ctxt)
|
||||
int sys_sigreturn(proc_ep, sig_ctxt)
|
||||
endpoint_t proc_ep; /* for which process */
|
||||
struct sigmsg *sig_ctxt; /* POSIX style handling */
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_sigsend *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_sigsend(proc_ep, sig_ctxt)
|
||||
int sys_sigsend(proc_ep, sig_ctxt)
|
||||
endpoint_t proc_ep; /* for which process */
|
||||
struct sigmsg *sig_ctxt; /* POSIX style handling */
|
||||
{
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_sprof *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_sprof(action, size, freq, type, endpt, ctl_ptr, mem_ptr)
|
||||
int sys_sprof(action, size, freq, type, endpt, ctl_ptr, mem_ptr)
|
||||
int action; /* start/stop profiling */
|
||||
int size; /* available profiling memory */
|
||||
int freq; /* sample frequency */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_statectl(int request)
|
||||
int sys_statectl(int request)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_stime(boottime)
|
||||
int sys_stime(boottime)
|
||||
time_t boottime; /* New boottime */
|
||||
{
|
||||
message m;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_sysctl(int code, char *arg1, int arg2)
|
||||
int sys_sysctl(int code, char *arg1, int arg2)
|
||||
{
|
||||
message m;
|
||||
|
||||
@@ -13,7 +13,7 @@ PUBLIC int sys_sysctl(int code, char *arg1, int arg2)
|
||||
|
||||
}
|
||||
|
||||
PUBLIC int sys_sysctl_stacktrace(endpoint_t ep)
|
||||
int sys_sysctl_stacktrace(endpoint_t ep)
|
||||
{
|
||||
return sys_sysctl(SYSCTL_CODE_STACKTRACE, NULL, ep);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_times(proc_ep, user_time, sys_time, uptime, boottime)
|
||||
int sys_times(proc_ep, user_time, sys_time, uptime, boottime)
|
||||
endpoint_t proc_ep; /* proc_ep whose times are needed */
|
||||
clock_t *user_time; /* time spend in the process itself */
|
||||
clock_t *sys_time; /* time spend in system on behalf of the
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_trace(req, proc_ep, addr, data_p)
|
||||
int sys_trace(req, proc_ep, addr, data_p)
|
||||
int req;
|
||||
endpoint_t proc_ep;
|
||||
long addr, *data_p;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_umap *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_umap(proc_ep, seg, vir_addr, bytes, phys_addr)
|
||||
int sys_umap(proc_ep, seg, vir_addr, bytes, phys_addr)
|
||||
endpoint_t proc_ep; /* process number to do umap for */
|
||||
int seg; /* T, D, or S segment */
|
||||
vir_bytes vir_addr; /* address in bytes with segment*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_umap_remote *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_umap_remote(proc_ep, grantee, seg, vir_addr, bytes, phys_addr)
|
||||
int sys_umap_remote(proc_ep, grantee, seg, vir_addr, bytes, phys_addr)
|
||||
endpoint_t proc_ep; /* process number to do umap for */
|
||||
endpoint_t grantee; /* process nr to check as grantee */
|
||||
int seg; /* T, D, or S segment */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_vinb *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_vinb(pvb_pairs, nr_ports)
|
||||
int sys_vinb(pvb_pairs, nr_ports)
|
||||
pvb_pair_t *pvb_pairs; /* (port,byte-value)-pairs */
|
||||
int nr_ports; /* nr of pairs to be processed */
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_vinl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_vinl(pvl_pairs, nr_ports)
|
||||
int sys_vinl(pvl_pairs, nr_ports)
|
||||
pvl_pair_t *pvl_pairs; /* (port,long-value)-pairs */
|
||||
int nr_ports; /* nr of pairs to be processed */
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_vinw *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_vinw(pvw_pairs, nr_ports)
|
||||
int sys_vinw(pvw_pairs, nr_ports)
|
||||
pvw_pair_t *pvw_pairs; /* (port,word-value)-pairs */
|
||||
int nr_ports; /* nr of pairs to be processed */
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_vircopy(src_proc, src_seg, src_vir,
|
||||
int sys_vircopy(src_proc, src_seg, src_vir,
|
||||
dst_proc, dst_seg, dst_vir, bytes)
|
||||
endpoint_t src_proc; /* source process */
|
||||
int src_seg; /* source memory segment */
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_vmctl(endpoint_t who, int param, u32_t value)
|
||||
int sys_vmctl(endpoint_t who, int param, u32_t value)
|
||||
{
|
||||
message m;
|
||||
int r;
|
||||
@@ -12,7 +12,7 @@ PUBLIC int sys_vmctl(endpoint_t who, int param, u32_t value)
|
||||
return(r);
|
||||
}
|
||||
|
||||
PUBLIC int sys_vmctl_get_cr3_i386(endpoint_t who, u32_t *cr3)
|
||||
int sys_vmctl_get_cr3_i386(endpoint_t who, u32_t *cr3)
|
||||
{
|
||||
message m;
|
||||
int r;
|
||||
@@ -26,7 +26,7 @@ PUBLIC int sys_vmctl_get_cr3_i386(endpoint_t who, u32_t *cr3)
|
||||
return(r);
|
||||
}
|
||||
|
||||
PUBLIC int sys_vmctl_set_addrspace(endpoint_t who,
|
||||
int sys_vmctl_set_addrspace(endpoint_t who,
|
||||
phys_bytes ptroot, void *ptroot_v)
|
||||
{
|
||||
message m;
|
||||
@@ -41,7 +41,7 @@ PUBLIC int sys_vmctl_set_addrspace(endpoint_t who,
|
||||
return(r);
|
||||
}
|
||||
|
||||
PUBLIC int sys_vmctl_get_memreq(endpoint_t *who, vir_bytes *mem,
|
||||
int sys_vmctl_get_memreq(endpoint_t *who, vir_bytes *mem,
|
||||
vir_bytes *len, int *wrflag, endpoint_t *who_s, vir_bytes *mem_s,
|
||||
endpoint_t *requestor)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ PUBLIC int sys_vmctl_get_memreq(endpoint_t *who, vir_bytes *mem,
|
||||
return r;
|
||||
}
|
||||
|
||||
PUBLIC int sys_vmctl_enable_paging(void * data)
|
||||
int sys_vmctl_enable_paging(void * data)
|
||||
{
|
||||
message m;
|
||||
m.SVMCTL_WHO = SELF;
|
||||
@@ -72,7 +72,7 @@ PUBLIC int sys_vmctl_enable_paging(void * data)
|
||||
return _kernel_call(SYS_VMCTL, &m);
|
||||
}
|
||||
|
||||
PUBLIC int sys_vmctl_get_mapping(int index,
|
||||
int sys_vmctl_get_mapping(int index,
|
||||
phys_bytes *addr, phys_bytes *len, int *flags)
|
||||
{
|
||||
int r;
|
||||
@@ -94,7 +94,7 @@ PUBLIC int sys_vmctl_get_mapping(int index,
|
||||
return OK;
|
||||
}
|
||||
|
||||
PUBLIC int sys_vmctl_reply_mapping(int index, vir_bytes addr)
|
||||
int sys_vmctl_reply_mapping(int index, vir_bytes addr)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_voutb *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_voutb(pvb_pairs, nr_ports)
|
||||
int sys_voutb(pvb_pairs, nr_ports)
|
||||
pvb_pair_t *pvb_pairs; /* (port,byte-value)-pairs */
|
||||
int nr_ports; /* nr of pairs to be processed */
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_voutl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_voutl(pvl_pairs, nr_ports)
|
||||
int sys_voutl(pvl_pairs, nr_ports)
|
||||
pvl_pair_t *pvl_pairs; /* (port,long-value)-pairs */
|
||||
int nr_ports; /* nr of pairs to be processed */
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_voutw *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_voutw(pvw_pairs, nr_ports)
|
||||
int sys_voutw(pvw_pairs, nr_ports)
|
||||
pvw_pair_t *pvw_pairs; /* (port,word-value)-pairs */
|
||||
int nr_ports; /* nr of pairs to be processed */
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <minix/safecopies.h>
|
||||
|
||||
PUBLIC int sys_vsafecopy(struct vscp_vec *vec, int els)
|
||||
int sys_vsafecopy(struct vscp_vec *vec, int els)
|
||||
{
|
||||
/* Vectored variant of sys_safecopy*. */
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "syslib.h"
|
||||
|
||||
PUBLIC int sys_vtimer(proc, which, newval, oldval)
|
||||
int sys_vtimer(proc, which, newval, oldval)
|
||||
endpoint_t proc; /* proc to retrieve/set the timer for */
|
||||
int which; /* timer to retrieve/set */
|
||||
clock_t *newval; /* if non-NULL, set to this new value */
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/*===========================================================================*
|
||||
* sys_vumap *
|
||||
*===========================================================================*/
|
||||
PUBLIC int sys_vumap(
|
||||
int sys_vumap(
|
||||
endpoint_t endpt, /* source process endpoint, or SELF */
|
||||
struct vumap_vir *vvec, /* virtual (input) vector */
|
||||
int vcount, /* number of elements in vvec */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <lib.h>
|
||||
#include <minix/syslib.h>
|
||||
|
||||
PUBLIC int _taskcall(who, syscallnr, msgptr)
|
||||
int _taskcall(who, syscallnr, msgptr)
|
||||
endpoint_t who;
|
||||
int syscallnr;
|
||||
register message *msgptr;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/*===========================================================================*
|
||||
* tickdelay *
|
||||
*===========================================================================*/
|
||||
PUBLIC int tickdelay(ticks)
|
||||
int tickdelay(ticks)
|
||||
long ticks; /* number of ticks to wait */
|
||||
{
|
||||
/* This function uses the synchronous alarm to delay for a while. This works
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
#include <timers.h>
|
||||
#include <minix/sysutil.h>
|
||||
|
||||
PRIVATE timer_t *timers = NULL;
|
||||
PRIVATE int expiring = 0;
|
||||
static timer_t *timers = NULL;
|
||||
static int expiring = 0;
|
||||
|
||||
/*===========================================================================*
|
||||
* init_timer *
|
||||
*===========================================================================*/
|
||||
PUBLIC void init_timer(timer_t *tp)
|
||||
void init_timer(timer_t *tp)
|
||||
{
|
||||
tmr_inittimer(tp);
|
||||
}
|
||||
@@ -29,7 +29,7 @@ PUBLIC void init_timer(timer_t *tp)
|
||||
/*===========================================================================*
|
||||
* set_timer *
|
||||
*===========================================================================*/
|
||||
PUBLIC void set_timer(timer_t *tp, int ticks, tmr_func_t watchdog, int arg)
|
||||
void set_timer(timer_t *tp, int ticks, tmr_func_t watchdog, int arg)
|
||||
{
|
||||
int r;
|
||||
clock_t now, prev_time = 0, next_time;
|
||||
@@ -51,7 +51,7 @@ PUBLIC void set_timer(timer_t *tp, int ticks, tmr_func_t watchdog, int arg)
|
||||
/*===========================================================================*
|
||||
* cancel_timer *
|
||||
*===========================================================================*/
|
||||
PUBLIC void cancel_timer(timer_t *tp)
|
||||
void cancel_timer(timer_t *tp)
|
||||
{
|
||||
clock_t next_time, prev_time;
|
||||
prev_time = tmrs_clrtimer(&timers, tp, &next_time);
|
||||
@@ -69,7 +69,7 @@ PUBLIC void cancel_timer(timer_t *tp)
|
||||
/*===========================================================================*
|
||||
* expire_timers *
|
||||
*===========================================================================*/
|
||||
PUBLIC void expire_timers(clock_t now)
|
||||
void expire_timers(clock_t now)
|
||||
{
|
||||
clock_t next_time;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/*===========================================================================*
|
||||
* vm_brk *
|
||||
*===========================================================================*/
|
||||
PUBLIC int vm_brk(endpoint_t ep, char *addr)
|
||||
int vm_brk(endpoint_t ep, char *addr)
|
||||
{
|
||||
message m;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
/*===========================================================================*
|
||||
* vm_exec_newmem *
|
||||
*===========================================================================*/
|
||||
PUBLIC int vm_exec_newmem(endpoint_t ep, struct exec_newmem *args,
|
||||
int vm_exec_newmem(endpoint_t ep, struct exec_newmem *args,
|
||||
int argssize, char **ret_stack_top, int *ret_flags)
|
||||
{
|
||||
message m;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user