#ifndef _IXPROTOS_H_
#define _IXPROTOS_H_

/* Miscelaneous prototypes */
void	ix_panic (const char *msg, ...);
BPTR   *__load_seg (char *name, char **args);
void	__wait_packet(struct StandardPacket *sp);
void	__wait_sync_packet(struct StandardPacket *sp);
BPTR	__plock (const char *file_name, int (*last_func)(), void *last_arg);
void	close_libraries(void);
int	__ioerr_to_errno(int ioerr);
void	kfree(void *mem);
void   *kmalloc(size_t size);
void   *krealloc(void *mem, size_t size);
void	vfork_own_malloc (void);
void	__free_seg(BPTR *seg);
void	ix_remove_sigwinch (void);
void	ix_install_sigwinch (void);
void	ix_lock_base (void);
void	ix_unlock_base (void);
int	check_hardware (void);
int	betterthan68000(void);
int	gotanfpu(void);
void	resetfpu(void);
void	all_free (void);
void	_cli_parse(struct Process *this_proc, long alen, char *_aptr, int *argc, char ***argv);
void	_psignal (struct Task *t, int sig);
void	__Close (BPTR fh);
int	__get_file (struct file *f);
void	__release_file (struct file *f);
int	__tioctl(struct file *f, unsigned int cmd, unsigned int inout, unsigned int arglen, unsigned int arg);
BPTR	__lock (char *name, int mode);
BPTR	__llock (char *name, int mode);
int	__unlock (BPTR lock);
int	ix_sleep (caddr_t chan, char *wmesg);
void	setrun (struct Task *t);
void	NewList(struct List *list);
int	falloc(struct file **resultfp, int *resultfd);
int	ufalloc(int want, int *result);
void	ix_wakeup (u_int waitchan);
int	__make_link (char *path, BPTR targ, int mode);
void	DeletePort (struct MsgPort *port);
void	DeleteInterruptPort (struct MsgPort *port);
struct MsgPort *CreatePort(const char *name, int pri);
struct MsgPort *CreateInterruptPort (const char *name, int pri, void (*code)(), void *data);
struct Task *CreateTask (char *name, int pri, void *initPC, u_int stackSize);
void	__init_stdinouterr(void);
void	init_buddy (void);
void	configure_context_switch (void);
void	siginit(struct user *p);
void	DeleteStdIO (struct IOStdReq *ios);
void	__init_std_packet(struct StandardPacket *sp);
int	issig(struct user *p);
void	_psignalgrp(struct Process *proc, int signal);
void	mp_interrupt(void);
void   *b_alloc (int size, unsigned pool);
void    b_free (void *fb, int size);
int	__fstat(struct file *f);
void	sendsig (struct user *p, sig_t catcher, int sig, int mask, unsigned code, void *addr);
void	trapsignal(struct Task *t, int sig, unsigned code, void *addr);
int	convert_dir (struct file *f, char *name, int omask);
void	timevaladd(struct timeval *t1, const struct timeval *t2);
int     __fioctl(struct file *f, unsigned int cmd, unsigned int inout, unsigned int arglen, unsigned int arg);
int	is_ixconfig(char *);
void	psig(struct user *p, int sig);
int	init_inet_daemon(int *argc, char ***argv);
void	shutdown_inet_daemon(void);
void	initstack(void);
void	freestack(void);
int	sigprocmask (int how, const sigset_t *mask, sigset_t *omask);
int	kill(pid_t pid, int signo);
void    set_dir_name_from_lock(BPTR lock);
void	_clean_longjmp (jmp_buf, int);
gid_t	getegid (void);
uid_t	geteuid (void);
struct Task *pfind (pid_t p);
void	proc_reparent(struct Process *child, struct Process *parent);
int	set_socket_stdio(int sock);
void    send_death_msg(struct user *mu);
void	stopped_process_handler(void);
void	DeleteTask(struct Task *tc);
sigset_t sigblock(sigset_t);
sigset_t sigsetmask(sigset_t);
sig_t	signal(int, sig_t);
pid_t	waitpid(pid_t, int *, int);
int	_getsockopt __P((struct file *, int, int, void *, int *));
void	_set_socket_params __P((struct file *,int));
#endif
