Changeset 2254 for trunk/src/emx/include
- Timestamp:
- Jul 17, 2005, 2:25:44 PM (20 years ago)
- Location:
- trunk/src/emx/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/InnoTekLIBC/backend.h
-
Property cvs2svn:cvs-rev
changed from
1.27
to1.28
r2253 r2254 770 770 * 771 771 * @returns 0 on success, pSigInfo containing status info. 772 * @returns -1 and errnoon failure.772 * @returns Negated error code (errno.h) on failure. 773 773 * @param enmIdType What kind of process specification Id contains. 774 774 * @param Id Process specification of the enmIdType sort. -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/InnoTekLIBC/logstrict.h
-
Property cvs2svn:cvs-rev
changed from
1.13
to1.14
r2253 r2254 7 7 * 8 8 * Copyright (c) 2004 InnoTek Systemberatung GmbH 9 * Copyright (c) 2004-2005 knut st. osmundsen <bird-srcspam@anduin.net> 9 10 * Author: knut st. osmundsen <bird-srcspam@anduin.net> 10 11 * … … 76 77 unsigned __libclog_uEnterTS__ = __libc_LogEnter(__LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, __PRETTY_FUNCTION__, __VA_ARGS__) 77 78 #else 78 #define LIBCLOG_ENTER(...) //hmm79 #define LIBCLOG_ENTER(...) //... 79 80 #endif 80 81 … … 84 85 __libc_LogMsg(__libclog_uEnterTS__, __LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, __PRETTY_FUNCTION__, __VA_ARGS__) 85 86 #else 86 #define LIBCLOG_MSG(...) do {} while (0)87 #endif 88 89 /** Macro to log a generic message within a function w. */87 #define LIBCLOG_MSG(...) ((void)0) 88 #endif 89 90 /** Macro to log a generic message within a function. */ 90 91 #ifdef DEBUG_LOGGING 91 92 #define LIBCLOG_MSG2(...) \ 92 93 __libc_LogMsg(~0, __LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, __PRETTY_FUNCTION__, __VA_ARGS__) 93 94 #else 94 #define LIBCLOG_MSG2(...) do {} while (0) 95 #define LIBCLOG_MSG2(...) ((void)0) 96 #endif 97 98 /** Macro to log an user error within a function entered by LIBCLOG_ENTER(). */ 99 #ifdef DEBUG_LOGGING 100 #define LIBCLOG_ERROR(...) \ 101 __libc_LogError(__libclog_uEnterTS__, __LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__) 102 #else 103 #define LIBCLOG_ERROR(...) ((void)0) 104 #endif 105 106 /** Macro to log an user error within a function. */ 107 #ifdef DEBUG_LOGGING 108 #define LIBCLOG_ERROR2(...) \ 109 __libc_LogError(~0, __LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__) 110 #else 111 #define LIBCLOG_ERROR2(...) ((void)0) 112 #endif 113 114 /** Macro to check for and log an user error within a function entered by LIBCLOG_ENTER(). */ 115 #ifdef DEBUG_LOGGING 116 #define LIBCLOG_ERROR_CHECK(expr, ...) \ 117 (!(expr) ? __libc_LogError(__libclog_uEnterTS__, __LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__) : ((void)0) ) 118 #else 119 #define LIBCLOG_ERROR_CHECK(expr, ...) ((void)0) 120 #endif 121 122 /** Macro to check for and log an user error within a function. */ 123 #ifdef DEBUG_LOGGING 124 #define LIBCLOG_ERROR2_CHECK(expr, ...) \ 125 (!(expr) ? __libc_LogError(~0, __LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__) : ((void)0) ) 126 #else 127 #define LIBCLOG_ERROR2_CHECK(expr, ...) ((void)0) 95 128 #endif 96 129 … … 100 133 __libc_LogRaw(__LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, string, maxlen) 101 134 #else 102 #define LIBCLOG_RAW(...) do {} while (0)103 #endif 104 105 /** Macro to l og a function exit. */135 #define LIBCLOG_RAW(...) ((void)0) 136 #endif 137 138 /** Macro to leave a function entered by LIBCLOG_ENTER(). */ 106 139 #ifdef DEBUG_LOGGING 107 140 #define LIBCLOG_LEAVE(...) \ 108 141 __libc_LogLeave(__libclog_uEnterTS__, __LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, __PRETTY_FUNCTION__, __VA_ARGS__) 109 142 #else 110 #define LIBCLOG_LEAVE(...) do {} while (0)143 #define LIBCLOG_LEAVE(...) ((void)0) 111 144 #endif 112 145 113 146 /** Macro to log a custom message and return. */ 114 #define LIBCLOG_RETURN_MSG(rc,...) do { LIBCLOG_LEAVE(__VA_ARGS__); 147 #define LIBCLOG_RETURN_MSG(rc,...) do { LIBCLOG_LEAVE(__VA_ARGS__); return (rc); } while (0) 115 148 /** Macro to log a custom message and return. */ 116 #define LIBCLOG_RETURN_MSG_VOID(...) do { LIBCLOG_LEAVE(__VA_ARGS__); 149 #define LIBCLOG_RETURN_MSG_VOID(...) do { LIBCLOG_LEAVE(__VA_ARGS__); return; } while (0) 117 150 118 151 /** Macro to log a void return and do the return. */ … … 128 161 /** Macro to log a pointer return and do the return. */ 129 162 #define LIBCLOG_RETURN_P(rc) LIBCLOG_RETURN_MSG((rc), "ret %p\n", (void*)(rc)); 163 164 165 /** Macro to leave a function entered by LIBCLOG_ENTER() on user error. */ 166 #ifdef DEBUG_LOGGING 167 #define LIBCLOG_ERROR_LEAVE(...) \ 168 __libc_LogErrorLeave(__libclog_uEnterTS__, __LIBC_LOG_INSTANCE, __LIBC_LOG_GROUP, __PRETTY_FUNCTION__, __FILE__, __LINE__, __VA_ARGS__) 169 #else 170 #define LIBCLOG_ERROR_LEAVE(...) ((void)0) 171 #endif 172 173 /** Macro to log a user error and return. */ 174 #define LIBCLOG_ERROR_RETURN(rc,...) do { LIBCLOG_ERROR_LEAVE(__VA_ARGS__); return (rc); } while (0) 175 #define LIBCLOG_ERROR_RETURN_MSG LIBCLOG_ERROR_RETURN 176 /** Macro to log a user error and return. */ 177 #define LIBCLOG_ERROR_RETURN_MSG_VOID(...) do { LIBCLOG_ERROR_LEAVE(__VA_ARGS__); return; } while (0) 178 179 /** Macro to log a void return user error and do the return. */ 180 #define LIBCLOG_ERROR_RETURN_VOID() LIBCLOG_ERROR_RETURN_MSG_VOID( "ret void\n") 181 /** Macro to log an int return user error and do the return. */ 182 #define LIBCLOG_ERROR_RETURN_INT(rc) LIBCLOG_ERROR_RETURN_MSG((rc), "ret %d (%#x)\n", (rc), (rc)) 183 /** Macro to log an unsigned int return user error and do the return. */ 184 #define LIBCLOG_ERROR_RETURN_UINT(rc) LIBCLOG_ERROR_RETURN_MSG((rc), "ret %u (%#x)\n", (rc), (rc)); 185 /** Macro to log an long int return user error and do the return. */ 186 #define LIBCLOG_ERROR_RETURN_LONG(rc) LIBCLOG_ERROR_RETURN_MSG((rc), "ret %ld (%#lx)\n", (rc), (rc)); 187 /** Macro to log an unsigned long int return user error and do the return. */ 188 #define LIBCLOG_ERROR_RETURN_ULONG(rc) LIBCLOG_ERROR_RETURN_MSG((rc), "ret %lu (%#lx)\n", (rc), (rc)); 189 /** Macro to log a pointer return user error and do the return. */ 190 #define LIBCLOG_ERROR_RETURN_P(rc) LIBCLOG_ERROR_RETURN_MSG((rc), "ret %p\n", (void*)(rc)); 191 130 192 131 193 /** @defgroup __libc_log_flags Message Flags (to be combined with group) … … 183 245 /** Memory Manager APIs. */ 184 246 #define __LIBC_LOG_GRP_MMAN 16 247 /** Load APIs. */ 248 #define __LIBC_LOG_GRP_LDR 1 /** @todo fix me */ 185 249 186 250 /** Backend SysV IPC APIs. */ … … 467 531 /** 468 532 * Output a leave function log message. 533 * 469 534 * A leave message is considered to be one line and is appended a newline if 470 535 * none was given. … … 481 546 482 547 /** 548 * Output a leave function log message upon a user error. 549 * 550 * The function may breakpoint if configured to do so. A leave message is 551 * considered to be one line and is appended a newline if none was given. 552 * 553 * @param uEnterTS The timestamp returned by LogEnter. 554 * @param pvInstance Logger instance. If NULL the message goes to the 555 * default log instance. 556 * @param fGroupAndFlags Logging group and logging flags. 557 * @param pszFunction Name of the function which was entered. 558 * @param pszFile Source filename. 559 * @param uLine Line number. 560 * @param pszFormat Format string to display the result. 561 * @param ... Arguments to the format string. 562 */ 563 extern void __libc_LogErrorLeave(unsigned uEnterTS, void *pvInstance, unsigned fGroupAndFlags, const char *pszFunction, const char *pszFile, unsigned uLine, const char *pszFormat, ...) __printflike(7, 8); 564 565 /** 483 566 * Output a log message. 567 * 484 568 * A log message is considered to be one line and is appended a newline if 485 569 * none was given. … … 494 578 */ 495 579 extern void __libc_LogMsg(unsigned uEnterTS, void *pvInstance, unsigned fGroupAndFlags, const char *pszFunction, const char *pszFormat, ...) __printflike(5, 6); 580 581 /** 582 * Output a log user error message. 583 * 584 * This may raise a breakpoint exception if configured so. A log message is 585 * considered to be one line and is appended a newline if none was given. 586 * 587 * @param uEnterTS The timestamp returned by LogEnter. 588 * @param pvInstance Logger instance. If NULL the message goes to the 589 * default log instance. 590 * @param fGroupAndFlags Logging group and logging flags. 591 * @param pszFunction Name of the function which was entered. 592 * @param pszFile Source filename. 593 * @param uLine Line number. 594 * @param pszFormat Format string for the message to log. 595 * @param ... Arguments to the format string. 596 */ 597 extern void __libc_LogError(unsigned uEnterTS, void *pvInstance, unsigned fGroupAndFlags, const char *pszFunction, const char *pszFile, unsigned uLine, const char *pszFormat, ...) __printflike(7, 8); 496 598 497 599 /** -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/InnoTekLIBC/thread.h
-
Property cvs2svn:cvs-rev
changed from
1.13
to1.14
r2253 r2254 502 502 * @returns 0 on success. 503 503 * @returns -1 on failure. errno set. 504 * @param i TLSIndexValue returned by __libc_TLSAlloc().504 * @param iIndex Value returned by __libc_TLSAlloc(). 505 505 */ 506 506 int __libc_TLSFree(int iIndex); … … 511 511 * @returns value in given TLS entry. 512 512 * @returns NULL on failure with errno set. 513 * @param i TLSIndexValue returned by __libc_TLSAlloc().513 * @param iIndex Value returned by __libc_TLSAlloc(). 514 514 */ 515 515 void * __libc_TLSGet(int iIndex); … … 520 520 * @returns 0 on success. 521 521 * @returns -1 on failure. errno set. 522 * @param i TLSIndexValue returned by __libc_TLSAlloc().522 * @param iIndex Value returned by __libc_TLSAlloc(). 523 523 * @param pvValue Value to store. 524 524 */ … … 529 529 * 530 530 * The destructor function will be called when a thread terminates 531 * in a normal fashion and the TLS entry i TLSIndex of that thread is531 * in a normal fashion and the TLS entry iIndex of that thread is 532 532 * not NULL. 533 533 * … … 536 536 * @returns 0 on succces. 537 537 * @returns -1 on failure. errno set. 538 * @param i TLSIndexValue returned by __libc_TLSAlloc().538 * @param iIndex Value returned by __libc_TLSAlloc(). 539 539 * @param pfnDestructor Callback function. Use NULL to unregister a previously 540 540 * registered destructor. … … 552 552 * this function. The result from doing that is undefined. 553 553 */ 554 int __libc_TLSDestructor(int iIndex, void (*pfnDestructor)(void *pvValue, int i TLSIndex, unsigned fFlags), unsigned fFlags);554 int __libc_TLSDestructor(int iIndex, void (*pfnDestructor)(void *pvValue, int iIndex, unsigned fFlags), unsigned fFlags); 555 555 556 556 … … 562 562 * @returns Pointer to destructor if registered. 563 563 * 564 * @param i TLSIndexValue returned by __libc_TLSAlloc().564 * @param iIndex Value returned by __libc_TLSAlloc(). 565 565 * @param pfFlags Where to store the flags supplied to __libc_TLSDestructor(). 566 566 * NULL is ok. 567 567 */ 568 void (*__libc_TLSGetDestructor(int i TLSIndex, unsigned *pfFlags))(void *, int, unsigned);568 void (*__libc_TLSGetDestructor(int iIndex, unsigned *pfFlags))(void *, int, unsigned); 569 569 570 570 /* fix later */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/startup.h
-
Property cvs2svn:cvs-rev
changed from
1.6
to1.7
r2253 r2254 4 4 #define _EMX_STARTUP_H 5 5 6 #if defined (__cplusplus) 7 extern "C" { 8 #endif 6 #include <sys/cdefs.h> 9 7 8 __BEGIN_DECLS 9 10 unsigned _System _DLL_InitTerm(unsigned, unsigned); 10 11 extern int _CRT_init(void); 11 12 extern void _CRT_term(void); … … 52 53 extern char ** _org_environ; 53 54 54 #if defined (__cplusplus) 55 } 56 #endif 55 __END_DECLS 57 56 58 57 #endif /* not _EMX_STARTUP_H */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.