Blame arch/nt32/psxglue.h

296178
#ifndef _PSXGLUE_H_
296178
#define _PSXGLUE_H_
296178
296178
#define __PSXOPT_NATIVE		0x0
296178
#define __PSXOPT_POSIX		0x1
296178
#define __PSXOPT_TTYDBG		0x2
296178
#define __PSXOPT_LDSO		0x4
296178
296178
typedef int	__ldso_dladdr(const void * addr, void * info);
296178
typedef int	__ldso_dlinfo(void * dso, int req, void * res);
296178
typedef void *	__ldso_dlsym(void * p, const char * s, void * ra);
296178
typedef void *	__ldso_dlopen(const char * file, int mode);
296178
typedef int	__ldso_dlclose(void *p);
296178
typedef char *	__ldso_dlerror(void);
296178
typedef void	__ldso_reset_tls(void);
296178
296178
typedef void	__psx_convert_thread(void);
296178
typedef void	__psx_unmapself(void *, void *);
296178
typedef void *	__psx_get_osfhandle(int fd);
296178
296178
struct __ldso_vtbl {
296178
	__ldso_dladdr *		dladdr;
296178
	__ldso_dlinfo *		dlinfo;
296178
	__ldso_dlsym *		dlsym;
296178
	__ldso_dlopen *		dlopen;
296178
	__ldso_dlclose *	dlclose;
296178
	__ldso_dlerror *	dlerror;
296178
	__ldso_reset_tls *	reset_tls;
296178
};
296178
296178
struct __psx_vtbl {
296178
	__psx_convert_thread *	convert_thread;
296178
	__psx_unmapself *	unmapself;
296178
	__psx_get_osfhandle *	get_osfhandle;
296178
};
296178
296178
struct __psx_context {
296178
	int			size;
296178
	int			options;
296178
	void ***		sys_vtbl;
296178
	struct __ldso_vtbl *	ldso_vtbl;
296178
	struct __psx_vtbl *	psx_vtbl;
296178
	unsigned int		teb_sys_idx;
296178
	unsigned int		teb_libc_idx;
296178
	void *			pthread_surrogate_fn;
296178
	void *			pthread_create_fn;
5085e9
	void *			do_global_ctors_fn;
5085e9
	void *			do_global_dtors_fn;
296178
};
296178
296178
struct __tlca {
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
296178
typedef int __psx_init_routine(
296178
	int *			argc,
296178
	char ***		argv,
296178
	char ***		envp,
296178
	struct __psx_context *	ctx);
296178
296178
#endif