diff options
author | midipix <writeonce@midipix.org> | 2015-04-12 12:23:25 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2015-04-12 12:23:25 -0400 |
commit | e09104e6e294bed185227d5a2065d7a1877562b9 (patch) | |
tree | 653a13f382f8d3616af9e33d307958d6888ac93f /src/dalist_impl.h | |
parent | cb9b22e21865f75bb968ec6c27952a230e4dc527 (diff) | |
download | dalist-e09104e6e294bed185227d5a2065d7a1877562b9.tar.bz2 dalist-e09104e6e294bed185227d5a2065d7a1877562b9.tar.xz |
dalist: initial commit.
Diffstat (limited to 'src/dalist_impl.h')
-rw-r--r-- | src/dalist_impl.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/dalist_impl.h b/src/dalist_impl.h new file mode 100644 index 0000000..97cef11 --- /dev/null +++ b/src/dalist_impl.h @@ -0,0 +1,43 @@ +#include <dalist/dalist.h> + +/* internal synonyms and prototypes */ +typedef dalist_memfn_custom memfn_custom; +typedef dalist_memfn_mmap memfn_mmap; +typedef dalist_memfn_malloc memfn_malloc; +typedef dalist_memfn_nt_allocvm memfn_allocvm; + + +/* memfn_allocvm */ +#define NT_STATUS_SUCCESS 0 +#define NT_CURRENT_PROCESS_HANDLE (void *)(uintptr_t)-1 +#define NT_PAGE_READWRITE (0x0004u) +#define NT_MEM_COMMIT (0x1000u) +#define NT_MEM_RESERVE (0x2000u) +#define NT_MEM_DECOMMIT (0x4000u) +#define NT_MEM_RELEASE (0x8000u) + +/* host environment */ +#if defined (MIDIPIX_FREESTANDING) +#define dalist_errno(x) x +#define PROT_READ 1 +#define PROT_WRITE 2 +#define MAP_ANON 0x20 +#define MAP_SHARED 0x01 +#else +#define dalist_errno(x) errno +#endif + +typedef struct _dalist_io_status_block { + union { + int32_t status; + void * pointer; + }; + intptr_t info; +} dalist_io_status_block, dalist_iosb; + + +typedef int dalist_dbg_write( + struct dalist_ex * dlist, + intptr_t fildes_or_hfile, + const void * buf, + size_t nbyte); |