Ignore:
Timestamp:
Sep 17, 2020, 11:52:16 PM (5 years ago)
Author:
bird
Message:

kash: Use kHlpAssert instead of assert.h (debugger stops on the assertion rather than at exit process code).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kash/shthread.c

    r2498 r3477  
    2727#include "shthread.h"
    2828#include "shinstance.h"
    29 #include <assert.h>
    3029
    3130#if K_OS == K_OS_WINDOWS
     
    6665    {
    6766        sh_tls = TlsAlloc();
    68         assert(sh_tls != TLS_OUT_OF_INDEXES);
     67        kHlpAssert(sh_tls != TLS_OUT_OF_INDEXES);
    6968    }
    7069    if (!TlsSetValue(sh_tls, psh))
    71         assert(0);
     70        kHlpAssert(0);
    7271
    7372#elif K_OS == K_OS_OS2
     
    7574    {
    7675        sh_tls = __libc_TLSAlloc();
    77         assert(sh_tls != -1);
     76        kHlpAssert(sh_tls != -1);
    7877    }
    7978    if (__libc_TLSSet(sh_tls, psh) == -1)
    80         assert(0);
     79        kHlpAssert(0);
    8180#else
    8281    if (!sh_tls_inited)
    8382    {
    8483        if (pthread_key_create(&sh_tls, NULL) != 0)
    85             assert(0);
     84            kHlpAssert(0);
    8685        sh_tls_inited = 1;
    8786    }
    8887    if (pthread_setspecific(sh_tls, psh) != 0)
    89         assert(0);
     88        kHlpAssert(0);
    9089#endif
    9190}
Note: See TracChangeset for help on using the changeset viewer.