Blame arch/nt32/psxglue.h

296178
#ifndef _PSXGLUE_H_
296178
#define _PSXGLUE_H_
296178
296178
#define __PSXOPT_NATIVE		0x0
296178
#define __PSXOPT_POSIX		0x1
3cf872
#define __PSXOPT_DINGA		0x2
296178
#define __PSXOPT_LDSO		0x4
96b093
#define __PSXOPT_VRFS		0x8
296178
1a03f6
struct __seh_vtbl;
1a03f6
296178
struct __ldso_vtbl {
6f8ae4
	int	(*dladdr)	(const void * addr, void * info);
6f8ae4
	int	(*dlinfo)	(void * dso, int req, void * res);
6f8ae4
	void *	(*dlsym)	(void * p, const char * s, void * ra);
6f8ae4
	void *	(*dlopen)	(const char * file, int mode, const char ** pathv, int * status);
724fbc
	void *	(*dldopen)	(int fd, int mode, int * status);
724fbc
	void *	(*dlsopen)	(const char * file, int mode, int * status);
6f8ae4
	int	(*dlclose)	(void *p);
6f8ae4
	char *	(*dlerror)	(void);
07b681
	void	(*tlsreset)	(void);
296178
};
296178
296178
struct __psx_vtbl {
6f8ae4
	void	(*do_global_ctors_fn)	();
6f8ae4
	void	(*do_global_dtors_fn)	();
da370a
	int	(*mm_start_main)	(int, char **, int (*)());
da370a
	void	(*mm_convert_thread)	(void);
da370a
	void	(*mm_unmapself)		(void *, size_t);
da370a
	ssize_t	(*mm_log_output)	(void *, ssize_t);
296178
};
296178
bd9527
struct __tlca_abi {
296178
	void *	pthread_self;
296178
	int *	pthread_set_child_tid;
296178
	int *	pthread_clear_child_tid;
296178
	char *	pthread_tls;
44d991
	char **	pthread_dtls;
296178
};
296178
6f8ae4
struct __psx_context {
6f8ae4
	int				size;
6f8ae4
	int				options;
6c368a
	void *				ldsoaddr;
31dfe3
	const unsigned short *		ctty;
6f8ae4
	void **				sys_vtbl;
65a872
	const struct __psx_vtbl *	psx_vtbl;
1a03f6
	const struct __seh_vtbl *	seh_vtbl;
65a872
	const struct __dbg_vtbl *	dbg_vtbl;
6f8ae4
	const struct __ldso_vtbl *	ldso_vtbl;
6f8ae4
	unsigned int			teb_sys_idx;
6f8ae4
	unsigned int			teb_libc_idx;
6f8ae4
	void *				pthread_surrogate_fn;
6f8ae4
	void *				pthread_create_fn;
faeb23
	int				(*usrmain)();
6f8ae4
};
6f8ae4
296178
typedef int __psx_init_routine(
296178
	int *			argc,
296178
	char ***		argv,
296178
	char ***		envp,
296178
	struct __psx_context *	ctx);
296178
296178
#endif