Search:

Type: Posts; User: awsdert

Page 1 of 20 1 2 3 4

Search: Search took 0.05 seconds.

  1. Replies
    8
    Views
    3,674

    gmail really needs to stop mark cboard mail as...

    gmail really needs to stop mark cboard mail as spam, anyways I ultimately found semget & co and now default to those instead since I can forcefully invalidate the semaphore at compile time by...
  2. Replies
    8
    Views
    3,674

    That's the same as #define INVALID_NPAWSEM...

    That's the same as
    #define INVALID_NPAWSEM ((union{pawcu r[sizeof(sem_t)]; sem_t s;}){{0}}).s but with a runtime cost instead, not what I'm looking for. A use case for non-allocated semaphores...
  3. Replies
    8
    Views
    3,674

    sem_open is next on the list to wrap but it...

    sem_open is next on the list to wrap but it doesn't resolve the need to invalidate the semaphore at compile time. For now I'm using this:


    typedef sem_t npawsem;
    #define INVALID_NPAWSEM...
  4. Replies
    8
    Views
    3,674

    I'm writing a bare bones api wrapper that I can...

    I'm writing a bare bones api wrapper that I can then use to make a cross-platform abi. Can't get around endianess and pointer sizes (though the PATH variable at least helps a tone in that respect)...
  5. Replies
    8
    Views
    3,674

    Semaphore pre-initialisation

    Let's say I have this:


    #ifdef _WIN32
    typedef HANDLE sem;
    #define INVALID SEM NULL
    ...
    #else
    typedef sem_t sem;
    #define INVALID_SEM ...
  6. Did not know of that, thanks :) One thing I've...

    Did not know of that, thanks :) One thing I've noted so far is that is seems less friendly than the version I've made for my own:



    typedef struct
    {
    pawd leng, full;
    pawmbc fill;
    pawmbs...
  7. Anyone know a list of environment variable path standards?

    What I mean is a list of the standards used in paths, like for example:



    %VAR%
    $V
    $(VAR)


    Designing a pseudo file system for my cross-platform ABI so that reliant software can reduce the...
  8. Thank you, that does look like an acceptable...

    Thank you, that does look like an acceptable compromise to me, my library's ABI is going to mandate GNU ABI anyways so this looks good enough, I'll see if there's a portable version later but for now...
  9. Is there an independent gcc object linker for windows?

    I know linux etc have ld but what about windows? I don't want to need to install the full mingw/mingw64 devkits for what I'm making, I'd even be fine with manually implementing the linker if I have...
  10. Eventually realised it was impossible to do bit...

    Eventually realised it was impossible to do bit rotation without the copy of the original to reference:


    PAW_QCK pawku* _paweintu__ror_move
    ( pawku a, pawku b, pawju shl, pawju shr )
    {...
  11. Never mind, I think I figured out how to do it...

    Never mind, I think I figured out how to do it right (at least in local segment form anyways, the loop still needs to be fixed):


    typedef struct { pawku n[6]; } paweintrotu;
    /* Rotate right */...
  12. I'm back, struggling to visualise how to fix my code

    I've added the only snippets that should matter below, as for the context: I'm making my own library and launcher pair (some might remember about that from a long time back), after having finished...
  13. Just in case anyone was interested, this is how...

    Just in case anyone was interested, this is how I'm planning to implement exception handling without bugging out the CRT if it happens to be active:


    PAW_OPEN_C_API
    PAW_API void...
  14. Never mind, found what I was looking for:...

    Never mind, found what I was looking for: EXCEPTION_RECORD (winnt.h) - Win32 apps | Microsoft Learn
  15. What would be the alternative to signal.h with just windows.h?

    Trying to write my library to be completely unreliant on the CRT (since that has far too many versions to deal with), I've gotten past a number of issues in doing that but replacing the SIGINT etc...
  16. Replies
    0
    Views
    941

    Thread syncronisation via linked lists

    Had an idea for implementing thread syncronisation without any system calls (bar 2 for thread id and yielding), also posted on reddit:

    Reddit - Dive into anything



    /* This is for a train of...
  17. Replies
    1
    Views
    1,368

    Occurred to me a while ago __COUNTER__ is a bad...

    Occurred to me a while ago __COUNTER__ is a bad choice for incrementing the value, instead I've switch to __INCLUDE_LEVEL__ for now
  18. Replies
    1
    Views
    1,368

    Debuggable C89 templates

    I thought up a way to do proper templates in C89, probably K&C variety too if they support #include, #define, #undef, #error & defined() in some form or way. There's also a loop version that I...
  19. Replies
    2
    Views
    1,467

    Okay, I think I found the closest equivalent of...

    Okay, I think I found the closest equivalent of EBADE, ERROR_EXCEPTION_IN_SERVICE, after finding identifier - Linux source code (v6.2.7) - Bootlin I looked up what it's used in and noticed in the...
  20. Replies
    2
    Views
    1,467

    Haven't found a suitable match yet but since I'm...

    Haven't found a suitable match yet but since I'm doing custom semaphores that use more general error codes I decided to use the originals for a different purpose, anyone think there might be an issue...
  21. Replies
    2
    Views
    1,467

    Errno codes vs Win32 Error codes

    Trying to map as many error codes that closely match as possible for general usage without the #ifdefs (beyond what is used for the mappings), currently trying to identify the equivalent of EBADE, so...
  22. This function is just to extract the exponent so...

    This function is just to extract the exponent so that I can construct a string from the float, because I'm doing this for a custom library that is to work with or without libc I have to avoid relying...
  23. Extracting an exponent without knowing the size of the mantissa & exponent

    I've come up with this:


    typedef union _pawkfdunion
    {
    pawkfd num;
    pawku val;
    pawcu raw[sizeof(pawkfd)];
    } pawkfdunion;
  24. Replies
    3
    Views
    1,840

    Thanks, having look at it I think I'll still go...

    Thanks, having look at it I think I'll still go with a custom solution, was just about to post an improved version of my existing solution, realised I was taking the long route with buffers when...
  25. Replies
    3
    Views
    1,840

    Changed my mind about the wrapper after thinking...

    Changed my mind about the wrapper after thinking of a better solution, just ignore tlsalloc altogether...unless I need it specifically for declaring the buffer a thread local.



    typedef struct...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4