Changeset 3594
- Timestamp:
- Oct 2, 2007, 11:35:22 PM (18 years ago)
- Location:
- trunk/kStuff/kHlp
- Files:
-
- 7 edited
-
Bare/kHlpBare-gcc.c (modified) (1 diff)
-
Bare/kHlpBareAssert.c (modified) (2 diffs)
-
Bare/kHlpBareEnv.c (modified) (2 diffs)
-
Bare/kHlpBareHeap.c (modified) (3 diffs)
-
Bare/kHlpBareProcess.c (modified) (2 diffs)
-
Bare/kHlpBareThread.c (modified) (2 diffs)
-
Generic/kHlpPage.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/kStuff/kHlp/Bare/kHlpBare-gcc.c
r3573 r3594 142 142 KUPTR u = ch | (ch << 8); 143 143 u |= u << 16; 144 #if defined(__AMD64__)144 #if 145 145 u |= u << 32; 146 147 148 146 149 #endif 147 150 -
trunk/kStuff/kHlp/Bare/kHlpBareAssert.c
r3582 r3594 31 31 #include <k/kHlpString.h> 32 32 33 #if K_OS == K_OS_OS2 33 #if K_OS == K_OS_DARWIN 34 extern kHlpSys_write(int fd, const void *buf, KSIZE); 35 36 #elif K_OS == K_OS_OS2 34 37 # define INCL_BASE 35 38 # define INCL_ERRORS … … 51 54 static void kHlpAssertWrite(const char *pszMsg) 52 55 { 53 #if K_OS == K_OS_OS2 || K_OS == K_OS_WINDOWS 56 #if K_OS == K_OS_DARWIN 57 KSIZE cchMsg = kHlpStrLen(pszMsg); 58 kHlpSys_write(2 /* stderr */, pszMsg, cchMsg); 59 60 #elif K_OS == K_OS_OS2 || K_OS == K_OS_WINDOWS 54 61 /* 55 62 * Line by line. -
trunk/kStuff/kHlp/Bare/kHlpBareEnv.c
r3575 r3594 32 32 #include <k/kErrors.h> 33 33 34 #if K_OS == K_OS_OS2 34 #if K_OS == K_OS_DARWIN 35 36 #elif K_OS == K_OS_OS2 35 37 # define INCL_BASE 36 38 # define INCL_ERRORS 37 39 # include <os2.h> 40 38 41 #elif K_OS == K_OS_WINDOWS 39 42 # include <Windows.h> 43 40 44 #else 41 45 # error "port me" … … 45 49 KHLP_DECL(int) kHlpGetEnv(const char *pszVar, char *pszVal, KSIZE cchVal) 46 50 { 47 #if K_OS == K_OS_OS2 51 #if K_OS == K_OS_DARWIN 52 /** @todo need to figure out where the stuff is or how it's inherited on darwin ... */ 53 return KERR_ENVVAR_NOT_FOUND; 54 55 #elif K_OS == K_OS_OS2 48 56 PSZ pszValue = NULL; 49 57 int rc; -
trunk/kStuff/kHlp/Bare/kHlpBareHeap.c
r3578 r3594 38 38 # define INCL_ERRORS 39 39 # include <os2.h> 40 40 41 #elif K_OS == K_OS_WINDOWS 41 42 # include <Windows.h> 43 42 44 #else 43 # error "port me"45 # 44 46 #endif 45 47 … … 716 718 717 719 #else 718 # error "Port me" 720 int rc; 721 722 pSeg->cb = (cbMin + 0xffff) & ~(KSIZE)0xffff; 723 pSeg->pvBase = NULL; 724 rc = kHlpPageAlloc(&pSeg->pvBase, pSeg->cb, KPROT_READWRITE, K_FALSE); 725 if (rc) 726 { 727 pSeg->pvBase = NULL; 728 pSeg->cb = 0; 729 return rc; 730 } 731 719 732 #endif 720 733 … … 739 752 740 753 #else 741 # error "Port me" 754 int rc = kHlpPageFree(pSeg->pvBase, pSeg->cb); 755 KHLPHEAP_ASSERT(!rc); (void)rc; 756 742 757 #endif 743 758 } -
trunk/kStuff/kHlp/Bare/kHlpBareProcess.c
r3573 r3594 31 31 #include <k/kHlpAssert.h> 32 32 33 #if K_OS == K_OS_OS2 33 #if K_OS == K_OS_DARWIN 34 extern void kHlpSys_exit(int rc); 35 36 #elif K_OS == K_OS_OS2 34 37 # define INCL_BASE 35 38 # define INCL_ERRORS … … 51 54 for (;;) 52 55 { 53 #if K_OS == K_OS_OS2 56 #if K_OS == K_OS_DARWIN 57 kHlpSys_exit(rc); 58 59 #elif K_OS == K_OS_OS2 54 60 DosExit(EXIT_PROCESS, rc); 55 61 -
trunk/kStuff/kHlp/Bare/kHlpBareThread.c
r3573 r3594 30 30 #include <k/kHlpThread.h> 31 31 32 #if K_OS == K_OS_OS2 32 #if K_OS == K_OS_DARWIN 33 34 #elif K_OS == K_OS_OS2 33 35 # define INCL_BASE 34 36 # define INCL_ERRORS …
