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...
Type: Posts; User: awsdert
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...
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...
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...
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)...
Let's say I have this:
#ifdef _WIN32
typedef HANDLE sem;
#define INVALID SEM NULL
...
#else
typedef sem_t sem;
#define INVALID_SEM ...
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...
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...
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...
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...
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 )
{...
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 */...
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...
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...
Never mind, found what I was looking for: EXCEPTION_RECORD (winnt.h) - Win32 apps | Microsoft Learn
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...
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...
Occurred to me a while ago __COUNTER__ is a bad choice for incrementing the value, instead I've switch to __INCLUDE_LEVEL__ for now
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...
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...
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...
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...
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...
I've come up with this:
typedef union _pawkfdunion
{
pawkfd num;
pawku val;
pawcu raw[sizeof(pawkfd)];
} pawkfdunion;
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...
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...