Tag Archives: code

Plain and clear cases of “don’t do that – fix your code in stead”

For the last few days, a discussion (that has become heated from time to time) has been going on on the comp.lang.c usenet group. The subject is a “signal anomaly”: the OP wants to catch SIGSEGV and carry on along … Continue reading

Posted in C & C++, Software Development | Tagged | Comments Off on Plain and clear cases of “don’t do that – fix your code in stead”

Changing an API in subtle, unpredictable ways

Many seasoned Windows systems programmers will know that you can wait for the death of a thread with WaitForSingleObject and for the deaths of multiple threads with its bigger brother, WaitForMultipleObjects. Big brother changes its behavior on some platforms, though … Continue reading

Posted in C & C++, Windows | Tagged , , | Comments Off on Changing an API in subtle, unpredictable ways

Using Four-Letter Words In Code

When writing firmware and device drivers, it is useful, sometimes, to have human-readable integer values – i.e. integer values that, when you read them in a debugger, mean something distinctive. This is different from using integers that have a distinctive … Continue reading

Posted in C & C++, Software Design | Tagged | 1 Comment