<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mike/sst/src/os.c, branch v0.18-BETA</title>
<subtitle>Source Speedrun Tools: practice tools and handy features for Source Engine games</subtitle>
<id>https://qdb.woz.blue/mike/sst/atom?h=v0.18-BETA</id>
<link rel='self' href='https://qdb.woz.blue/mike/sst/atom?h=v0.18-BETA'/>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/'/>
<updated>2026-10-10T03:23:05+00:00</updated>
<entry>
<title>Abstract page allocation and locking in os.c</title>
<updated>2026-10-10T03:23:05+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2026-05-10T13:51:46+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=e66dbc42d523ec6d1a4e1b4fec21fb211eb660bb'/>
<id>urn:sha1:e66dbc42d523ec6d1a4e1b4fec21fb211eb660bb</id>
<content type='text'>
Simplifies ac.c just a little bit.
</content>
</entry>
<entry>
<title>Do away with memcpy/memset/memcmp</title>
<updated>2026-02-16T19:11:24+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-12-27T03:05:05+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=8d4b47298b6c9eeb9a3f79a5b80d894f80ed4a45'/>
<id>urn:sha1:8d4b47298b6c9eeb9a3f79a5b80d894f80ed4a45</id>
<content type='text'>
Now everything is either explicitly a rep thing, or explicitly some
other small run of reasonably efficient instructions. No library calls
or function call overhead of any kind. Code size remains nice and small.

Ban a few other bad libc functions while we're at it. More can be added
later if we decide that's a useful idea.

This will require some discipline and workarounds to cope with Clang's
tendency to shove mem* calls in places you don't want them even when you
tell it not to. Well, c'est la vie.

I'm a little nervous that the __builtin_memmove() usage in shuntvars()
could still one day emit actual library calls. It appears we're not
importing memmove() from anywhere at the moment, though. So I guess it's
good enough for now.

Also I had to get rid of alloca() in con_.c but that was kind of bad
anyway, so that's fine.
</content>
</entry>
<entry>
<title>Remove years from copyright headers</title>
<updated>2025-04-07T20:31:32+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-04-07T20:31:32+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=58b495650f7613cdebfe78fff9de2b99556f1998'/>
<id>urn:sha1:58b495650f7613cdebfe78fff9de2b99556f1998</id>
<content type='text'>
They're legally unnecessary as far as I know, and kind of annoying to
maintain on a long-term basis.

This was done with the consent of all 3 other contributors, in case
anyone was wondering.
</content>
</entry>
<entry>
<title>Use C23 void-argument-free prototypes</title>
<updated>2025-04-06T15:41:13+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2025-03-10T20:37:28+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=daa55cade14146f04814cf8a7ad2028becf4db66'/>
<id>urn:sha1:daa55cade14146f04814cf8a7ad2028becf4db66</id>
<content type='text'>
In the future we can also consider moving to {} instead of {0} for
initialisers, but my old Clang (16) doesn't support this, so it might be
wise to wait longer on that one so people don't need too bleeding-edge
of a compiler just to build this thing.
</content>
</entry>
<entry>
<title>Fix a Linux woopsy in os.c I spotted the other day</title>
<updated>2024-09-08T12:59:28+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2024-09-08T12:59:28+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=fed587fee58614570a7a34ea52584357effb817a'/>
<id>urn:sha1:fed587fee58614570a7a34ea52584357effb817a</id>
<content type='text'>
Note: for all I know Linux isn't even compiling right now - I rarely
actually test that. But still, might as well fix this since it's an
obvious mistake.
</content>
</entry>
<entry>
<title>Revise syntax macros and add a ton of branch hints</title>
<updated>2024-08-23T19:37:37+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2024-08-03T22:40:31+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=83da606072ce272eb053d4e1497d77e647cfecae'/>
<id>urn:sha1:83da606072ce272eb053d4e1497d77e647cfecae</id>
<content type='text'>
My new programming style is branch hints. All non-confusing branches
must be hinted when I can be bothered. It's faster, sometimes, maybe.

Also, start trying to use more signed sizes in at least some of the
places where it makes sense. Unsigned sizes are surprisingly
error-prone!
</content>
</entry>
<entry>
<title>Rework OS abstractions</title>
<updated>2024-08-21T23:01:06+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2024-08-03T15:11:57+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=44902cb49cd51e2bb2f1cef05cb3c0e799b83434'/>
<id>urn:sha1:44902cb49cd51e2bb2f1cef05cb3c0e799b83434</id>
<content type='text'>
- As much as possible avoid dragging system headers into translation
  units. This should avoid namespace pollution and, hopefully, speed up
  builds a little bit.

- Avoid leaning on the UCRT so much on Windows - prefer native win32
  calls and native file handles except where doing so is inconvenient
  (in particular, for stat(), which we might try and replace later).

- Also, switch from SystemFunction036 to ProcessPrng on Windows. This
  requires us to generate a stub for bcryptprimitives.dll because
  Microsoft haven't bothered to provide a link library, but the function
  is better-documented and seems to be a more direct under-the-hood call
  as well. Apparently it's what's used by the major web browsers these
  days, which seems like a good indication it's stable and trusted.

- Lastly, remove a bunch of functions and macros and stuff that weren't
  actually being used. It seems good to try and keep the scope of
  OS-dependent stuff relatively contained and only add to it when
  actually required.
</content>
</entry>
<entry>
<title>Split up os.h, inline functions and fix some typos</title>
<updated>2021-12-30T16:18:25+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2021-12-30T16:18:25+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=f7cc6b4dcc164403d62c9b48ae37f1c4c20f4b4f'/>
<id>urn:sha1:f7cc6b4dcc164403d62c9b48ae37f1c4c20f4b4f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Initial public snapshot</title>
<updated>2021-11-20T03:18:08+00:00</updated>
<author>
<name>Michael Smith</name>
<email>mikesmiffy128@gmail.com</email>
</author>
<published>2021-11-20T03:10:50+00:00</published>
<link rel='alternate' type='text/html' href='https://qdb.woz.blue/mike/sst/commit/?id=da6f343032cb01597dc7866e66f091adf3243a62'/>
<id>urn:sha1:da6f343032cb01597dc7866e66f091adf3243a62</id>
<content type='text'>
With code from Bill. Thanks Bill!
</content>
</entry>
</feed>
