Change function prototype to use endpoint_t instead of int

This commit is contained in:
Xiaoguang Sun 2013-04-22 23:50:45 +00:00 committed by Lionel Sambuc
parent 8a3677def0
commit 20e6c9329f
7 changed files with 28 additions and 28 deletions

View file

@ -116,7 +116,7 @@ int vm_unmap(endpoint_t endpt, void *addr)
return _syscall(VM_PROC_NR, VM_SHM_UNMAP, &m); return _syscall(VM_PROC_NR, VM_SHM_UNMAP, &m);
} }
unsigned long vm_getphys(int endpt, void *addr) unsigned long vm_getphys(endpoint_t endpt, void *addr)
{ {
message m; message m;
int r; int r;

View file

@ -90,7 +90,7 @@ void inet_panic(void) _NORETURN;
do { if (((level) & DEBUG) && (condition)) \ do { if (((level) & DEBUG) && (condition)) \
{ where(); code; } } while(0) { where(); code; } } while(0)
extern int this_proc; extern endpoint_t this_proc;
extern char version[]; extern char version[];
#ifndef HZ #ifndef HZ

View file

@ -393,7 +393,7 @@ static int cancel_nblock(struct dmap * dp,
int dev_io( int dev_io(
int op, /* DEV_READ, DEV_WRITE, DEV_IOCTL, etc. */ int op, /* DEV_READ, DEV_WRITE, DEV_IOCTL, etc. */
dev_t dev, /* major-minor device number */ dev_t dev, /* major-minor device number */
int proc_e, /* in whose address space is buf? */ endpoint_t proc_e, /* in whose address space is buf? */
void *buf, /* virtual address of the buffer */ void *buf, /* virtual address of the buffer */
u64_t pos, /* byte position */ u64_t pos, /* byte position */
size_t bytes, /* how many bytes to transfer */ size_t bytes, /* how many bytes to transfer */
@ -827,7 +827,7 @@ int ctty_io(
int no_dev( int no_dev(
int UNUSED(op), /* operation, DEV_OPEN or DEV_CLOSE */ int UNUSED(op), /* operation, DEV_OPEN or DEV_CLOSE */
dev_t UNUSED(dev), /* device to open or close */ dev_t UNUSED(dev), /* device to open or close */
int UNUSED(proc), /* process to open/close for */ endpoint_t UNUSED(proc), /* process to open/close for */
int UNUSED(flags) /* mode bits and flags */ int UNUSED(flags) /* mode bits and flags */
) )
{ {
@ -852,7 +852,7 @@ int no_dev_io(endpoint_t UNUSED(proc), message *UNUSED(m))
int clone_opcl( int clone_opcl(
int op, /* operation, DEV_OPEN or DEV_CLOSE */ int op, /* operation, DEV_OPEN or DEV_CLOSE */
dev_t dev, /* device to open or close */ dev_t dev, /* device to open or close */
int proc_e, /* process to open/close for */ endpoint_t proc_e, /* process to open/close for */
int flags /* mode bits and flags */ int flags /* mode bits and flags */
) )
{ {

View file

@ -14,8 +14,8 @@
*/ */
extern struct dmap { extern struct dmap {
int(*dmap_opcl) (int, dev_t, int, int); int(*dmap_opcl) (int, dev_t, endpoint_t, int);
int(*dmap_io) (int, message *); int(*dmap_io) (endpoint_t, message *);
endpoint_t dmap_driver; endpoint_t dmap_driver;
char dmap_label[LABEL_MAX]; char dmap_label[LABEL_MAX];
int dmap_flags; int dmap_flags;

View file

@ -505,7 +505,7 @@ static void free_proc(struct fproc *exiter, int flags)
* pm_exit * * pm_exit *
*===========================================================================*/ *===========================================================================*/
void pm_exit(proc) void pm_exit(proc)
int proc; endpoint_t proc;
{ {
/* Perform the file system portion of the exit(status) system call. */ /* Perform the file system portion of the exit(status) system call. */
int exitee_p; int exitee_p;
@ -520,7 +520,7 @@ int proc;
* pm_setgid * * pm_setgid *
*===========================================================================*/ *===========================================================================*/
void pm_setgid(proc_e, egid, rgid) void pm_setgid(proc_e, egid, rgid)
int proc_e; endpoint_t proc_e;
int egid; int egid;
int rgid; int rgid;
{ {
@ -539,7 +539,7 @@ int rgid;
* pm_setgroups * * pm_setgroups *
*===========================================================================*/ *===========================================================================*/
void pm_setgroups(proc_e, ngroups, groups) void pm_setgroups(proc_e, ngroups, groups)
int proc_e; endpoint_t proc_e;
int ngroups; int ngroups;
gid_t *groups; gid_t *groups;
{ {
@ -562,7 +562,7 @@ gid_t *groups;
* pm_setuid * * pm_setuid *
*===========================================================================*/ *===========================================================================*/
void pm_setuid(proc_e, euid, ruid) void pm_setuid(proc_e, euid, ruid)
int proc_e; endpoint_t proc_e;
int euid; int euid;
int ruid; int ruid;
{ {

View file

@ -40,12 +40,12 @@ int dev_io(int op, dev_t dev, endpoint_t proc_e, void *buf, u64_t pos,
int gen_opcl(int op, dev_t dev, endpoint_t task_nr, int flags); int gen_opcl(int op, dev_t dev, endpoint_t task_nr, int flags);
int gen_io(endpoint_t driver_e, message *mess_ptr); int gen_io(endpoint_t driver_e, message *mess_ptr);
int asyn_io(endpoint_t drv_e, message *mess_ptr); int asyn_io(endpoint_t drv_e, message *mess_ptr);
int no_dev(int op, dev_t dev, int proc, int flags); int no_dev(int op, dev_t dev, endpoint_t proc, int flags);
int no_dev_io(int, message *); int no_dev_io(endpoint_t, message *);
int tty_opcl(int op, dev_t dev, endpoint_t proc, int flags); int tty_opcl(int op, dev_t dev, endpoint_t proc, int flags);
int ctty_opcl(int op, dev_t dev, endpoint_t proc, int flags); int ctty_opcl(int op, dev_t dev, endpoint_t proc, int flags);
int clone_opcl(int op, dev_t dev, int proc, int flags); int clone_opcl(int op, dev_t dev, endpoint_t proc, int flags);
int ctty_io(int task_nr, message *mess_ptr); int ctty_io(endpoint_t task_nr, message *mess_ptr);
int do_ioctl(message *m_out); int do_ioctl(message *m_out);
void pm_setsid(endpoint_t proc_e); void pm_setsid(endpoint_t proc_e);
void dev_status(endpoint_t drv_e); void dev_status(endpoint_t drv_e);
@ -62,13 +62,13 @@ int do_mapdriver(void);
void init_dmap(void); void init_dmap(void);
void init_dmap_locks(void); void init_dmap_locks(void);
int dmap_driver_match(endpoint_t proc, int major); int dmap_driver_match(endpoint_t proc, int major);
void dmap_endpt_up(int proc_nr, int is_blk); void dmap_endpt_up(endpoint_t proc_nr, int is_blk);
void dmap_unmap_by_endpt(int proc_nr); void dmap_unmap_by_endpt(endpoint_t proc_nr);
struct dmap *get_dmap(endpoint_t proc_e); struct dmap *get_dmap(endpoint_t proc_e);
struct dmap *get_dmap_by_major(int major); struct dmap *get_dmap_by_major(int major);
int do_mapdriver(void); int do_mapdriver(void);
int map_service(struct rprocpub *rpub); int map_service(struct rprocpub *rpub);
void dmap_unmap_by_endpt(int proc_nr); void dmap_unmap_by_endpt(endpoint_t proc_nr);
int map_driver(const char *label, int major, endpoint_t proc_nr, int int map_driver(const char *label, int major, endpoint_t proc_nr, int
dev_style, int flags); dev_style, int flags);
int map_service(struct rprocpub *rpub); int map_service(struct rprocpub *rpub);
@ -132,12 +132,12 @@ void thread_cleanup(struct fproc *rfp);
void unlock_proc(struct fproc *rfp); void unlock_proc(struct fproc *rfp);
/* misc.c */ /* misc.c */
void pm_exit(int proc); void pm_exit(endpoint_t proc);
int do_fcntl(message *m_out); int do_fcntl(message *m_out);
void pm_fork(int pproc, int cproc, int cpid); void pm_fork(endpoint_t pproc, endpoint_t cproc, pid_t cpid);
void pm_setgid(int proc_e, int egid, int rgid); void pm_setgid(endpoint_t proc_e, int egid, int rgid);
void pm_setuid(int proc_e, int euid, int ruid); void pm_setuid(endpoint_t proc_e, int euid, int ruid);
void pm_setgroups(int proc_e, int ngroups, gid_t *addr); void pm_setgroups(endpoint_t proc_e, int ngroups, gid_t *addr);
int do_sync(message *m_out); int do_sync(message *m_out);
int do_fsync(message *m_out); int do_fsync(message *m_out);
void pm_reboot(void); void pm_reboot(void);

View file

@ -108,11 +108,11 @@ int munmap(void *, size_t);
void * minix_mmap(void *, size_t, int, int, int, off_t); void * minix_mmap(void *, size_t, int, int, int, off_t);
void * minix_mmap_for(endpoint_t, void *, size_t, int, int, int, off_t); void * minix_mmap_for(endpoint_t, void *, size_t, int, int, int, off_t);
int minix_munmap(void *, size_t); int minix_munmap(void *, size_t);
void * vm_remap(int d, int s, void *da, void *sa, size_t si); void * vm_remap(endpoint_t d, endpoint_t s, void *da, void *sa, size_t si);
void * vm_remap_ro(int d, int s, void *da, void *sa, size_t si); void * vm_remap_ro(endpoint_t d, endpoint_t s, void *da, void *sa, size_t si);
int vm_unmap(int endpt, void *addr); int vm_unmap(endpoint_t endpt, void *addr);
unsigned long vm_getphys(int endpt, void *addr); unsigned long vm_getphys(endpoint_t endpt, void *addr);
u8_t vm_getrefcount(int endpt, void *addr); u8_t vm_getrefcount(endpoint_t endpt, void *addr);
#endif /* __minix */ #endif /* __minix */
__END_DECLS __END_DECLS