Blame src/dalist_impl.h

e09104
#include <dalist/dalist.h>
e09104
e09104
/* internal synonyms and prototypes */
e09104
typedef dalist_memfn_custom	memfn_custom;
e09104
typedef dalist_memfn_mmap	memfn_mmap;
e09104
typedef dalist_memfn_malloc	memfn_malloc;
e09104
typedef dalist_memfn_nt_allocvm	memfn_allocvm;
e09104
e09104
e09104
/* memfn_allocvm */
e09104
#define NT_STATUS_SUCCESS		0
e09104
#define NT_CURRENT_PROCESS_HANDLE	(void *)(uintptr_t)-1
e09104
#define NT_PAGE_READWRITE		(0x0004u)
e09104
#define NT_MEM_COMMIT			(0x1000u)
e09104
#define NT_MEM_RESERVE			(0x2000u)
e09104
#define NT_MEM_DECOMMIT			(0x4000u)
e09104
#define NT_MEM_RELEASE			(0x8000u)
e09104
e09104
/* host environment */
e09104
#if defined (MIDIPIX_FREESTANDING)
e09104
#define dalist_errno(x) x
e09104
#define PROT_READ	1
e09104
#define PROT_WRITE	2
e09104
#define MAP_ANON	0x20
e09104
#define MAP_SHARED	0x01
e09104
#else
e09104
#define dalist_errno(x) errno
e09104
#endif
e09104
e09104
typedef struct _dalist_io_status_block {
e09104
	union {
e09104
		int32_t		status;
e09104
		void *		pointer;
e09104
	};
e09104
	intptr_t		info;
e09104
} dalist_io_status_block, dalist_iosb;
e09104
e09104
e09104
typedef int dalist_dbg_write(
e09104
	struct dalist_ex *	dlist,
e09104
	intptr_t		fildes_or_hfile,
e09104
	const void *		buf,
e09104
	size_t			nbyte);