System library changes to interface.
This commit is contained in:
		
							parent
							
								
									748b3dd434
								
							
						
					
					
						commit
						2471939f7d
					
				@ -270,9 +270,9 @@
 | 
			
		||||
#define NR_SYS_CALLS	36	/* number of system calls */ 
 | 
			
		||||
 | 
			
		||||
/* Field names for SYS_MEMSET, SYS_SEGCTL. */
 | 
			
		||||
#define MEM_PTR		m1_p1	/* base */
 | 
			
		||||
#define MEM_COUNT	m1_i1	/* count */
 | 
			
		||||
#define MEM_PATTERN	m1_i2   /* pattern to write */
 | 
			
		||||
#define MEM_PTR		m2_p1	/* base */
 | 
			
		||||
#define MEM_COUNT	m2_l1	/* count */
 | 
			
		||||
#define MEM_PATTERN	m2_l2   /* pattern to write */
 | 
			
		||||
#define MEM_CHUNK_BASE	m4_l1	/* physical base address */
 | 
			
		||||
#define MEM_CHUNK_SIZE	m4_l2	/* size of mem chunk */
 | 
			
		||||
#define MEM_TOT_SIZE	m4_l3	/* total memory size */
 | 
			
		||||
@ -347,8 +347,7 @@
 | 
			
		||||
#define CP_NR_BYTES	m5_l3	/* number of bytes to copy */
 | 
			
		||||
 | 
			
		||||
/* Field names for SYS_VCOPY and SYS_VVIRCOPY. */
 | 
			
		||||
#define VCP_SRC_PROC	m1_i1	/* process to copy from */
 | 
			
		||||
#define VCP_DST_PROC	m1_i2	/* process to copy to */
 | 
			
		||||
#define VCP_NR_OK	m1_i2	/* number of successfull copies */
 | 
			
		||||
#define VCP_VEC_SIZE	m1_i3	/* size of copy vector */
 | 
			
		||||
#define VCP_VEC_ADDR	m1_p1	/* pointer to copy vector */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -101,20 +101,18 @@ typedef struct {
 | 
			
		||||
 | 
			
		||||
/* Hide names to avoid name space pollution. */
 | 
			
		||||
#define echo		_echo
 | 
			
		||||
#define alert		_alert
 | 
			
		||||
#define notify		_notify
 | 
			
		||||
#define sendrec		_sendrec
 | 
			
		||||
#define receive		_receive
 | 
			
		||||
#define send		_send
 | 
			
		||||
#define notify		_notify
 | 
			
		||||
#define nb_receive	_nb_receive
 | 
			
		||||
#define nb_send		_nb_send
 | 
			
		||||
 | 
			
		||||
_PROTOTYPE( int echo, (message *m_ptr)					);
 | 
			
		||||
_PROTOTYPE( int alert, (int dest)					);
 | 
			
		||||
_PROTOTYPE( int notify, (int dest)					);
 | 
			
		||||
_PROTOTYPE( int sendrec, (int src_dest, message *m_ptr)			);
 | 
			
		||||
_PROTOTYPE( int receive, (int src, message *m_ptr)			);
 | 
			
		||||
_PROTOTYPE( int send, (int dest, message *m_ptr)			);
 | 
			
		||||
_PROTOTYPE( int notify, (int dest, message *m_ptr)			);
 | 
			
		||||
_PROTOTYPE( int nb_receive, (int src, message *m_ptr)			);
 | 
			
		||||
_PROTOTYPE( int nb_send, (int dest, message *m_ptr)			);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -23,20 +23,20 @@ struct reg86u;
 | 
			
		||||
/*==========================================================================* 
 | 
			
		||||
 * Minix system library. 						    *
 | 
			
		||||
 *==========================================================================*/ 
 | 
			
		||||
_PROTOTYPE( int _taskcall, (int who, int syscallnr, message *msgptr)	);
 | 
			
		||||
_PROTOTYPE( int _taskcall, (int who, int syscallnr, message *msgptr));
 | 
			
		||||
 | 
			
		||||
_PROTOTYPE( int sys_abort, (int how, ...)				);
 | 
			
		||||
_PROTOTYPE( int sys_abort, (int how, ...));
 | 
			
		||||
_PROTOTYPE( int sys_exec, (int proc, char *ptr,  
 | 
			
		||||
				char *aout, vir_bytes initpc)		);
 | 
			
		||||
_PROTOTYPE( int sys_fork, (int parent, int child, int pid)		);
 | 
			
		||||
_PROTOTYPE( int sys_newmap, (int proc, struct mem_map *ptr)		);
 | 
			
		||||
_PROTOTYPE( int sys_exit, (int proc)					);
 | 
			
		||||
_PROTOTYPE( int sys_trace, (int req, int proc, long addr, long *data_p)	);
 | 
			
		||||
				char *aout, vir_bytes initpc));
 | 
			
		||||
_PROTOTYPE( int sys_fork, (int parent, int child));
 | 
			
		||||
_PROTOTYPE( int sys_newmap, (int proc, struct mem_map *ptr));
 | 
			
		||||
_PROTOTYPE( int sys_exit, (int proc));
 | 
			
		||||
_PROTOTYPE( int sys_trace, (int req, int proc, long addr, long *data_p));
 | 
			
		||||
 | 
			
		||||
_PROTOTYPE( int sys_svrctl, (int proc, int req, int priv,vir_bytes argp));
 | 
			
		||||
_PROTOTYPE( int sys_nice, (int proc, int prio)				);
 | 
			
		||||
_PROTOTYPE( int sys_nice, (int proc, int priority));
 | 
			
		||||
 | 
			
		||||
_PROTOTYPE( int sys_int86, (struct reg86u *reg86p)				);
 | 
			
		||||
_PROTOTYPE( int sys_int86, (struct reg86u *reg86p));
 | 
			
		||||
 | 
			
		||||
/* Shorthands for sys_sdevio() system call. */
 | 
			
		||||
#define sys_insb(port, proc_nr, buffer, count) \
 | 
			
		||||
@ -48,12 +48,11 @@ _PROTOTYPE( int sys_int86, (struct reg86u *reg86p)				);
 | 
			
		||||
#define sys_outsw(port, proc_nr, buffer, count) \
 | 
			
		||||
	sys_sdevio(DIO_OUTPUT, port, DIO_WORD, proc_nr, buffer, count)
 | 
			
		||||
_PROTOTYPE( int sys_sdevio, (int req, long port, int type, int proc_nr,
 | 
			
		||||
	void *buffer, int count) );
 | 
			
		||||
	void *buffer, int count));
 | 
			
		||||
 | 
			
		||||
/* Clock functionality: get system times or (un)schedule an alarm call. */
 | 
			
		||||
_PROTOTYPE( int sys_times, (int proc_nr, clock_t *ptr)			);
 | 
			
		||||
#define sys_syncalrm sys_setalarm
 | 
			
		||||
_PROTOTYPE(int sys_setalarm, (int proc_nr, clock_t exp_time, int abs_time) );
 | 
			
		||||
_PROTOTYPE( int sys_times, (int proc_nr, clock_t *ptr));
 | 
			
		||||
_PROTOTYPE(int sys_setalarm, (clock_t exp_time, int abs_time));
 | 
			
		||||
 | 
			
		||||
/* Shorthands for sys_irqctl() system call. */
 | 
			
		||||
#define sys_irqdisable(hook_id) \
 | 
			
		||||
@ -79,16 +78,23 @@ _PROTOTYPE ( int sys_irqctl, (int request, int irq_vec, int policy,
 | 
			
		||||
#define sys_stackcopy(src_proc, src_vir, dst_proc, dst_vir, bytes) \
 | 
			
		||||
	sys_vircopy(src_proc, S, src_vir, dst_proc, S, dst_vir, bytes)
 | 
			
		||||
_PROTOTYPE(int sys_vircopy, (int src_proc, int src_seg, vir_bytes src_vir,
 | 
			
		||||
	int dst_proc, int dst_seg, vir_bytes dst_vir, phys_bytes bytes)	);
 | 
			
		||||
	int dst_proc, int dst_seg, vir_bytes dst_vir, phys_bytes bytes));
 | 
			
		||||
 | 
			
		||||
#define sys_abscopy(src_phys, dst_phys, bytes) \
 | 
			
		||||
	sys_physcopy(NONE, PHYS_SEG, src_phys, NONE, PHYS_SEG, dst_phys, bytes)
 | 
			
		||||
_PROTOTYPE(int sys_physcopy, (int src_proc, int src_seg, vir_bytes src_vir,
 | 
			
		||||
	int dst_proc, int dst_seg, vir_bytes dst_vir, phys_bytes bytes)	);
 | 
			
		||||
_PROTOTYPE(int sys_memset, (char c, phys_bytes base, phys_bytes bytes)	);
 | 
			
		||||
	int dst_proc, int dst_seg, vir_bytes dst_vir, phys_bytes bytes));
 | 
			
		||||
_PROTOTYPE(int sys_memset, (unsigned long pattern, 
 | 
			
		||||
		phys_bytes base, phys_bytes bytes));
 | 
			
		||||
 | 
			
		||||
/* Vectored virtual / physical copy calls. */
 | 
			
		||||
#if DEAD_CODE		/* library part not yet implemented */
 | 
			
		||||
_PROTOTYPE(int sys_virvcopy, (phys_cp_req *vec_ptr,int vec_size,int *nr_ok));
 | 
			
		||||
_PROTOTYPE(int sys_physvcopy, (phys_cp_req *vec_ptr,int vec_size,int *nr_ok));
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
_PROTOTYPE(int sys_umap, (int proc_nr, int seg, vir_bytes vir_addr,
 | 
			
		||||
	 vir_bytes bytes, phys_bytes *phys_addr) 			);
 | 
			
		||||
	 vir_bytes bytes, phys_bytes *phys_addr));
 | 
			
		||||
_PROTOTYPE(int sys_segctl, (int *index, u16_t *seg, vir_bytes *off,
 | 
			
		||||
	phys_bytes phys, vir_bytes size));
 | 
			
		||||
 | 
			
		||||
@ -113,7 +119,7 @@ _PROTOTYPE(int sys_getinfo, (int request, void *val_ptr, int val_len,
 | 
			
		||||
/* Signal control. */
 | 
			
		||||
_PROTOTYPE(int sys_kill, (int proc, int sig) );
 | 
			
		||||
_PROTOTYPE(int sys_sigsend, (int proc_nr, struct sigmsg *sig_ctxt) ); 
 | 
			
		||||
_PROTOTYPE(int sys_sigreturn, (int proc_nr, struct sigmsg *sig_ctxt, int flags) );
 | 
			
		||||
_PROTOTYPE(int sys_sigreturn, (int proc_nr, struct sigmsg *sig_ctxt) );
 | 
			
		||||
_PROTOTYPE(int sys_getksig, (int *k_proc_nr, sigset_t *k_sig_map) ); 
 | 
			
		||||
_PROTOTYPE(int sys_endksig, (int proc_nr) );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -47,6 +47,7 @@ struct vir_addr {
 | 
			
		||||
  vir_bytes offset;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#define phys_cp_req vir_cp_req 
 | 
			
		||||
struct vir_cp_req {
 | 
			
		||||
  struct vir_addr src;
 | 
			
		||||
  struct vir_addr dst;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user