retire PUBLIC, PRIVATE and FORWARD
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
/*===========================================================================*
|
||||
* do_abort *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_abort(struct proc * caller, message * m_ptr)
|
||||
int do_abort(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_abort. MINIX is unable to continue. This can originate e.g.
|
||||
* in the PM (normal abort) or TTY (after CTRL-ALT-DEL).
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/*===========================================================================*
|
||||
* do_clear *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_clear(struct proc * caller, message * m_ptr)
|
||||
int do_clear(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_clear. Only the PM can request other process slots to be cleared
|
||||
* when a process has exited.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/*===========================================================================*
|
||||
* do_copy *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_copy(struct proc * caller, message * m_ptr)
|
||||
int do_copy(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_vircopy() and sys_physcopy(). Copy data using virtual or
|
||||
* physical addressing. Although a single handler function is used, there
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
/*===========================================================================*
|
||||
* do_cprofile *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_cprofile(struct proc * caller, message * m_ptr)
|
||||
int do_cprofile(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
int proc_nr, i;
|
||||
phys_bytes len;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/*===========================================================================*
|
||||
* do_devio *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_devio(struct proc * caller, message * m_ptr)
|
||||
int do_devio(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
struct priv *privp;
|
||||
port_t port;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/*===========================================================================*
|
||||
* do_endksig *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_endksig(struct proc * caller, message * m_ptr)
|
||||
int do_endksig(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Finish up after a kernel type signal, caused by a SYS_KILL message or a
|
||||
* call to cause_sig by a task. This is called by a signal manager after
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/*===========================================================================*
|
||||
* do_exec *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_exec(struct proc * caller, message * m_ptr)
|
||||
int do_exec(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_exec(). A process has done a successful EXEC. Patch it up. */
|
||||
register struct proc *rp;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/*===========================================================================*
|
||||
* do_exit *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_exit(struct proc * caller, message * m_ptr)
|
||||
int do_exit(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_exit. A system process has requested to exit. Generate a
|
||||
* self-termination signal.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/*===========================================================================*
|
||||
* do_fork *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_fork(struct proc * caller, message * m_ptr)
|
||||
int do_fork(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_fork(). PR_ENDPT has forked. The child is PR_SLOT. */
|
||||
#if (_MINIX_CHIP == _CHIP_INTEL)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/*===========================================================================*
|
||||
* update_idle_time *
|
||||
*===========================================================================*/
|
||||
PRIVATE void update_idle_time(void)
|
||||
static void update_idle_time(void)
|
||||
{
|
||||
int i;
|
||||
struct proc * idl = proc_addr(IDLE);
|
||||
@@ -38,7 +38,7 @@ PRIVATE void update_idle_time(void)
|
||||
/*===========================================================================*
|
||||
* do_getinfo *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_getinfo(struct proc * caller, message * m_ptr)
|
||||
int do_getinfo(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Request system information to be copied to caller's address space. This
|
||||
* call simply copies entire data structures to the caller.
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/*===========================================================================*
|
||||
* do_getksig *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_getksig(struct proc * caller, message * m_ptr)
|
||||
int do_getksig(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* The signal manager is ready to accept signals and repeatedly does a kernel
|
||||
* call to get one. Find a process with pending signals. If no signals are
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
|
||||
#if USE_IRQCTL
|
||||
|
||||
FORWARD int generic_handler(irq_hook_t *hook);
|
||||
static int generic_handler(irq_hook_t *hook);
|
||||
|
||||
/*===========================================================================*
|
||||
* do_irqctl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_irqctl(struct proc * caller, message * m_ptr)
|
||||
int do_irqctl(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Dismember the request message. */
|
||||
int irq_vec;
|
||||
@@ -141,7 +141,7 @@ PUBLIC int do_irqctl(struct proc * caller, message * m_ptr)
|
||||
/*===========================================================================*
|
||||
* generic_handler *
|
||||
*===========================================================================*/
|
||||
PRIVATE int generic_handler(hook)
|
||||
static int generic_handler(hook)
|
||||
irq_hook_t *hook;
|
||||
{
|
||||
/* This function handles hardware interrupt in a simple and generic way. All
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/*===========================================================================*
|
||||
* do_kill *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_kill(struct proc * caller, message * m_ptr)
|
||||
int do_kill(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_kill(). Cause a signal to be sent to a process. Any request
|
||||
* is added to the map of pending signals and the signal manager
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/*===========================================================================*
|
||||
* do_getmcontext *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_getmcontext(struct proc * caller, message * m_ptr)
|
||||
int do_getmcontext(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Retrieve machine context of a process */
|
||||
|
||||
@@ -64,7 +64,7 @@ PUBLIC int do_getmcontext(struct proc * caller, message * m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_setmcontext *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_setmcontext(struct proc * caller, message * m_ptr)
|
||||
int do_setmcontext(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Set machine context of a process */
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
/*===========================================================================*
|
||||
* do_memset *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_memset(struct proc * caller, message * m_ptr)
|
||||
int do_memset(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_memset(). This writes a pattern into the specified memory. */
|
||||
unsigned char c = m_ptr->MEM_PATTERN;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/*===========================================================================*
|
||||
* do_newmap *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_newmap(struct proc * caller, message * m_ptr)
|
||||
int do_newmap(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_newmap(). Fetch the memory map. */
|
||||
struct proc *rp; /* process whose map is to be loaded */
|
||||
@@ -32,7 +32,7 @@ PUBLIC int do_newmap(struct proc * caller, message * m_ptr)
|
||||
/*===========================================================================*
|
||||
* newmap *
|
||||
*===========================================================================*/
|
||||
PUBLIC int newmap(struct proc *caller, struct proc *rp, struct mem_map *map_ptr)
|
||||
int newmap(struct proc *caller, struct proc *rp, struct mem_map *map_ptr)
|
||||
{
|
||||
int r;
|
||||
/* Fetch the memory map. */
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
|
||||
#define PRIV_DEBUG 0
|
||||
|
||||
FORWARD int update_priv(struct proc *rp, struct priv *priv);
|
||||
static int update_priv(struct proc *rp, struct priv *priv);
|
||||
|
||||
/*===========================================================================*
|
||||
* do_privctl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_privctl(struct proc * caller, message * m_ptr)
|
||||
int do_privctl(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_privctl(). Update a process' privileges. If the process is not
|
||||
* yet a system process, make sure it gets its own privilege structure.
|
||||
@@ -317,7 +317,7 @@ PUBLIC int do_privctl(struct proc * caller, message * m_ptr)
|
||||
/*===========================================================================*
|
||||
* update_priv *
|
||||
*===========================================================================*/
|
||||
PRIVATE int update_priv(struct proc *rp, struct priv *priv)
|
||||
static int update_priv(struct proc *rp, struct priv *priv)
|
||||
{
|
||||
/* Update the privilege structure of a given process. */
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/*===========================================================================*
|
||||
* do_profbuf *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_profbuf(struct proc * caller, message * m_ptr)
|
||||
int do_profbuf(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* This kernel call is used by profiled system processes when Call
|
||||
* Profiling is enabled. It is called on the first execution of procentry.
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/*===========================================================================*
|
||||
* do_runctl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_runctl(struct proc * caller, message * m_ptr)
|
||||
int do_runctl(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Control a process's RTS_PROC_STOP flag. Used for process management.
|
||||
* If the process is queued sending a message or stopped for system call
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#define MEM_TOP 0xFFFFFFFFUL
|
||||
|
||||
FORWARD int safecopy(struct proc *, endpoint_t, endpoint_t,
|
||||
static int safecopy(struct proc *, endpoint_t, endpoint_t,
|
||||
cp_grant_id_t, int, int, size_t, vir_bytes, vir_bytes, int);
|
||||
|
||||
#define HASGRANTTABLE(gr) \
|
||||
@@ -32,7 +32,7 @@ FORWARD int safecopy(struct proc *, endpoint_t, endpoint_t,
|
||||
/*===========================================================================*
|
||||
* verify_grant *
|
||||
*===========================================================================*/
|
||||
PUBLIC int verify_grant(granter, grantee, grant, bytes, access,
|
||||
int verify_grant(granter, grantee, grant, bytes, access,
|
||||
offset_in, offset_result, e_granter)
|
||||
endpoint_t granter, grantee; /* copyee, copyer */
|
||||
cp_grant_id_t grant; /* grant id */
|
||||
@@ -226,7 +226,7 @@ endpoint_t *e_granter; /* new granter (magic grants) */
|
||||
/*===========================================================================*
|
||||
* safecopy *
|
||||
*===========================================================================*/
|
||||
PRIVATE int safecopy(caller, granter, grantee, grantid, src_seg, dst_seg, bytes,
|
||||
static int safecopy(caller, granter, grantee, grantid, src_seg, dst_seg, bytes,
|
||||
g_offset, addr, access)
|
||||
struct proc * caller;
|
||||
endpoint_t granter, grantee;
|
||||
@@ -344,7 +344,7 @@ int access; /* CPF_READ for a copy from granter to grantee, CPF_WRITE
|
||||
/*===========================================================================*
|
||||
* do_safecopy_to *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_safecopy_to(struct proc * caller, message * m_ptr)
|
||||
int do_safecopy_to(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
return safecopy(caller, m_ptr->SCP_FROM_TO, caller->p_endpoint,
|
||||
(cp_grant_id_t) m_ptr->SCP_GID, m_ptr->SCP_SEG, D,
|
||||
@@ -355,7 +355,7 @@ PUBLIC int do_safecopy_to(struct proc * caller, message * m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_safecopy_from *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_safecopy_from(struct proc * caller, message * m_ptr)
|
||||
int do_safecopy_from(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
return safecopy(caller, m_ptr->SCP_FROM_TO, caller->p_endpoint,
|
||||
(cp_grant_id_t) m_ptr->SCP_GID, D, m_ptr->SCP_SEG,
|
||||
@@ -366,7 +366,7 @@ PUBLIC int do_safecopy_from(struct proc * caller, message * m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_vsafecopy *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_vsafecopy(struct proc * caller, message * m_ptr)
|
||||
int do_vsafecopy(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
static struct vscp_vec vec[SCPVEC_NR];
|
||||
static struct vir_addr src, dst;
|
||||
|
||||
@@ -117,7 +117,7 @@ static void clear_info(struct map_info_s *p)
|
||||
/*===========================================================================*
|
||||
* map_invoke_vm *
|
||||
*===========================================================================*/
|
||||
PUBLIC int map_invoke_vm(struct proc * caller,
|
||||
int map_invoke_vm(struct proc * caller,
|
||||
int req_type, /* VMPTYPE_... COWMAP, SMAP, SUNMAP */
|
||||
endpoint_t end_d, int seg_d, vir_bytes off_d,
|
||||
endpoint_t end_s, int seg_s, vir_bytes off_s,
|
||||
@@ -172,7 +172,7 @@ PUBLIC int map_invoke_vm(struct proc * caller,
|
||||
/*===========================================================================*
|
||||
* do_safemap *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_safemap(struct proc * caller, message * m_ptr)
|
||||
int do_safemap(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
endpoint_t grantor = m_ptr->SMAP_EP;
|
||||
cp_grant_id_t gid = (cp_grant_id_t) m_ptr->SMAP_GID;
|
||||
@@ -222,7 +222,7 @@ PUBLIC int do_safemap(struct proc * caller, message * m_ptr)
|
||||
/*===========================================================================*
|
||||
* safeunmap *
|
||||
*===========================================================================*/
|
||||
PRIVATE int safeunmap(struct proc * caller, struct map_info_s *p)
|
||||
static int safeunmap(struct proc * caller, struct map_info_s *p)
|
||||
{
|
||||
vir_bytes offset_result;
|
||||
endpoint_t new_grantor;
|
||||
@@ -250,7 +250,7 @@ PRIVATE int safeunmap(struct proc * caller, struct map_info_s *p)
|
||||
/*===========================================================================*
|
||||
* do_saferevmap *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_saferevmap(struct proc * caller, message * m_ptr)
|
||||
int do_saferevmap(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
struct map_info_s *p;
|
||||
int flag = m_ptr->SMAP_FLAG;
|
||||
@@ -267,7 +267,7 @@ PUBLIC int do_saferevmap(struct proc * caller, message * m_ptr)
|
||||
/*===========================================================================*
|
||||
* do_safeunmap *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_safeunmap(struct proc * caller, message * m_ptr)
|
||||
int do_safeunmap(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
vir_bytes address = (vir_bytes) m_ptr->SMAP_ADDRESS;
|
||||
int seg = (int)m_ptr->SMAP_SEG;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/*===========================================================================*
|
||||
* do_schedctl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_schedctl(struct proc * caller, message * m_ptr)
|
||||
int do_schedctl(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
struct proc *p;
|
||||
unsigned flags;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/*===========================================================================*
|
||||
* do_schedule *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_schedule(struct proc * caller, message * m_ptr)
|
||||
int do_schedule(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
struct proc *p;
|
||||
int proc_nr;
|
||||
|
||||
@@ -14,12 +14,12 @@
|
||||
|
||||
#if USE_SETALARM
|
||||
|
||||
FORWARD void cause_alarm(timer_t *tp);
|
||||
static void cause_alarm(timer_t *tp);
|
||||
|
||||
/*===========================================================================*
|
||||
* do_setalarm *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_setalarm(struct proc * caller, message * m_ptr)
|
||||
int do_setalarm(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* A process requests a synchronous alarm, or wants to cancel its alarm. */
|
||||
long exp_time; /* expiration time for this alarm */
|
||||
@@ -58,7 +58,7 @@ PUBLIC int do_setalarm(struct proc * caller, message * m_ptr)
|
||||
/*===========================================================================*
|
||||
* cause_alarm *
|
||||
*===========================================================================*/
|
||||
PRIVATE void cause_alarm(timer_t *tp)
|
||||
static void cause_alarm(timer_t *tp)
|
||||
{
|
||||
/* Routine called if a timer goes off and the process requested a synchronous
|
||||
* alarm. The process number is stored in timer argument 'ta_int'. Notify that
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/*===========================================================================*
|
||||
* do_setgrant *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_setgrant(struct proc * caller, message * m_ptr)
|
||||
int do_setgrant(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
int r;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/*===========================================================================*
|
||||
* do_sigreturn *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_sigreturn(struct proc * caller, message * m_ptr)
|
||||
int do_sigreturn(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* POSIX style signals require sys_sigreturn to put things in order before
|
||||
* the signalled process can resume execution
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
/*===========================================================================*
|
||||
* do_sigsend *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_sigsend(struct proc * caller, message * m_ptr)
|
||||
int do_sigsend(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_sigsend, POSIX-style signal handling. */
|
||||
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
#if SPROFILE
|
||||
|
||||
/* user address to write info struct */
|
||||
PRIVATE vir_bytes sprof_info_addr_vir;
|
||||
static vir_bytes sprof_info_addr_vir;
|
||||
|
||||
PRIVATE void clean_seen_flag(void)
|
||||
static void clean_seen_flag(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -32,7 +32,7 @@ PRIVATE void clean_seen_flag(void)
|
||||
/*===========================================================================*
|
||||
* do_sprofile *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_sprofile(struct proc * caller, message * m_ptr)
|
||||
int do_sprofile(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
int proc_nr;
|
||||
int err;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/*===========================================================================*
|
||||
* do_statectl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_statectl(struct proc * caller, message * m_ptr)
|
||||
int do_statectl(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_statectl(). A process has issued a state control request. */
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/*===========================================================================*
|
||||
* do_stime *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_stime(struct proc * caller, message * m_ptr)
|
||||
int do_stime(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
boottime= m_ptr->T_BOOTTIME;
|
||||
return(OK);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/*===========================================================================*
|
||||
* do_sysctl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_sysctl(struct proc * caller, message * m_ptr)
|
||||
int do_sysctl(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
vir_bytes len, buf;
|
||||
static char mybuf[DIAG_BUFSIZE];
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/*===========================================================================*
|
||||
* do_times *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_times(struct proc * caller, message * m_ptr)
|
||||
int do_times(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_times(). Retrieve the accounting information. */
|
||||
register const struct proc *rp;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/*==========================================================================*
|
||||
* do_trace *
|
||||
*==========================================================================*/
|
||||
PUBLIC int do_trace(struct proc * caller, message * m_ptr)
|
||||
int do_trace(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle the debugging commands supported by the ptrace system call
|
||||
* The commands are:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/*==========================================================================*
|
||||
* do_umap *
|
||||
*==========================================================================*/
|
||||
PUBLIC int do_umap(struct proc * caller, message * m_ptr)
|
||||
int do_umap(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
int seg_index = m_ptr->CP_SRC_SPACE & SEGMENT_INDEX;
|
||||
int endpt = (int) m_ptr->CP_SRC_ENDPT;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
/*==========================================================================*
|
||||
* do_umap_remote *
|
||||
*==========================================================================*/
|
||||
PUBLIC int do_umap_remote(struct proc * caller, message * m_ptr)
|
||||
int do_umap_remote(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Map virtual address to physical, for non-kernel processes. */
|
||||
int seg_type = m_ptr->CP_SRC_SPACE & SEGMENT_TYPE;
|
||||
|
||||
@@ -19,18 +19,18 @@
|
||||
(RTS_ISSET(p, RTS_NO_PRIV) || RTS_ISSET(p, RTS_SIG_PENDING) \
|
||||
|| (RTS_ISSET(p, RTS_RECEIVING) && !RTS_ISSET(p, RTS_SENDING)))
|
||||
|
||||
FORWARD void adjust_proc_slot(struct proc *rp, struct proc *from_rp);
|
||||
FORWARD void adjust_priv_slot(struct priv *privp, struct priv
|
||||
static void adjust_proc_slot(struct proc *rp, struct proc *from_rp);
|
||||
static void adjust_priv_slot(struct priv *privp, struct priv
|
||||
*from_privp);
|
||||
FORWARD void swap_fpu_state(struct proc *a_rp, struct proc *b_orig_rp,
|
||||
static void swap_fpu_state(struct proc *a_rp, struct proc *b_orig_rp,
|
||||
struct proc *b_copy_rp);
|
||||
FORWARD void swap_proc_slot_pointer(struct proc **rpp, struct proc
|
||||
static void swap_proc_slot_pointer(struct proc **rpp, struct proc
|
||||
*src_rp, struct proc *dst_rp);
|
||||
|
||||
/*===========================================================================*
|
||||
* do_update *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_update(struct proc * caller, message * m_ptr)
|
||||
int do_update(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Handle sys_update(). Update a process into another by swapping their process
|
||||
* slots.
|
||||
@@ -143,7 +143,7 @@ PUBLIC int do_update(struct proc * caller, message * m_ptr)
|
||||
/*===========================================================================*
|
||||
* adjust_proc_slot *
|
||||
*===========================================================================*/
|
||||
PRIVATE void adjust_proc_slot(struct proc *rp, struct proc *from_rp)
|
||||
static void adjust_proc_slot(struct proc *rp, struct proc *from_rp)
|
||||
{
|
||||
/* Preserve endpoints, slot numbers, priv structure, IPC, FPU pointer. */
|
||||
rp->p_endpoint = from_rp->p_endpoint;
|
||||
@@ -165,7 +165,7 @@ PRIVATE void adjust_proc_slot(struct proc *rp, struct proc *from_rp)
|
||||
/*===========================================================================*
|
||||
* adjust_priv_slot *
|
||||
*===========================================================================*/
|
||||
PRIVATE void adjust_priv_slot(struct priv *privp, struct priv *from_privp)
|
||||
static void adjust_priv_slot(struct priv *privp, struct priv *from_privp)
|
||||
{
|
||||
/* Preserve privilege ids and non-privilege stuff in the priv structure. */
|
||||
privp->s_id = from_privp->s_id;
|
||||
@@ -178,7 +178,7 @@ PRIVATE void adjust_priv_slot(struct priv *privp, struct priv *from_privp)
|
||||
/*===========================================================================*
|
||||
* swap_fpu_state *
|
||||
*===========================================================================*/
|
||||
PRIVATE void swap_fpu_state(struct proc *a_rp, struct proc *b_orig_rp,
|
||||
static void swap_fpu_state(struct proc *a_rp, struct proc *b_orig_rp,
|
||||
struct proc *b_copy_rp)
|
||||
{
|
||||
/* Copy the FPU state from process B's copied slot, using B's original FPU
|
||||
@@ -196,7 +196,7 @@ PRIVATE void swap_fpu_state(struct proc *a_rp, struct proc *b_orig_rp,
|
||||
/*===========================================================================*
|
||||
* swap_proc_slot_pointer *
|
||||
*===========================================================================*/
|
||||
PRIVATE void swap_proc_slot_pointer(struct proc **rpp, struct proc *src_rp,
|
||||
static void swap_proc_slot_pointer(struct proc **rpp, struct proc *src_rp,
|
||||
struct proc *dst_rp)
|
||||
{
|
||||
if(*rpp == src_rp) {
|
||||
|
||||
@@ -15,15 +15,15 @@
|
||||
#if USE_VDEVIO
|
||||
|
||||
/* Buffer for SYS_VDEVIO to copy (port,value)-pairs from/ to user. */
|
||||
PRIVATE char vdevio_buf[VDEVIO_BUF_SIZE];
|
||||
PRIVATE pvb_pair_t * const pvb = (pvb_pair_t *) vdevio_buf;
|
||||
PRIVATE pvw_pair_t * const pvw = (pvw_pair_t *) vdevio_buf;
|
||||
PRIVATE pvl_pair_t * const pvl = (pvl_pair_t *) vdevio_buf;
|
||||
static char vdevio_buf[VDEVIO_BUF_SIZE];
|
||||
static pvb_pair_t * const pvb = (pvb_pair_t *) vdevio_buf;
|
||||
static pvw_pair_t * const pvw = (pvw_pair_t *) vdevio_buf;
|
||||
static pvl_pair_t * const pvl = (pvl_pair_t *) vdevio_buf;
|
||||
|
||||
/*===========================================================================*
|
||||
* do_vdevio *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_vdevio(struct proc * caller, message * m_ptr)
|
||||
int do_vdevio(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Perform a series of device I/O on behalf of a non-kernel process. The
|
||||
* I/O addresses and I/O values are fetched from and returned to some buffer
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
/*===========================================================================*
|
||||
* do_vmctl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_vmctl(struct proc * caller, message * m_ptr)
|
||||
int do_vmctl(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
int proc_nr;
|
||||
endpoint_t ep = m_ptr->SVMCTL_WHO;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
/*===========================================================================*
|
||||
* do_vtimer *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_vtimer(struct proc * caller, message * m_ptr)
|
||||
int do_vtimer(struct proc * caller, message * m_ptr)
|
||||
{
|
||||
/* Set and/or retrieve the value of one of a process' virtual timers. */
|
||||
struct proc *rp; /* pointer to process the timer belongs to */
|
||||
@@ -80,7 +80,7 @@ PUBLIC int do_vtimer(struct proc * caller, message * m_ptr)
|
||||
/*===========================================================================*
|
||||
* vtimer_check *
|
||||
*===========================================================================*/
|
||||
PUBLIC void vtimer_check(rp)
|
||||
void vtimer_check(rp)
|
||||
struct proc *rp; /* pointer to the process */
|
||||
{
|
||||
/* This is called from the clock task, so we can be interrupted by the clock
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/*===========================================================================*
|
||||
* do_vumap *
|
||||
*===========================================================================*/
|
||||
PUBLIC int do_vumap(struct proc *caller, message *m_ptr)
|
||||
int do_vumap(struct proc *caller, message *m_ptr)
|
||||
{
|
||||
/* Map a vector of grants or local virtual addresses to physical addresses.
|
||||
* Designed to be used by drivers to perform an efficient lookup of physical
|
||||
|
||||
Reference in New Issue
Block a user