News for hackers. Stuff that matters.
Re:Practical Guide to Bare Metal C++ by dragontamer on Friday June 02, 2017 @04:49PM (#14473196)
> I doubt Windows has C++ in any such place either.

https://msdn.microsoft.com/en-us/library/jj620896.aspx

Hint: This exists for a reason.

Another note: Window's Kernel exposes an API for custom user-mode task-scheduling (Called UMS). Its API is accessible from C++: https://msdn.microsoft.com/en-us/library/windows/desktop/dd6... . When you get to the ConcRT stuff (which is built on top of UMS), its C++ code for sure: https://msdn.microsoft.com/en-us/library/ee207192.aspx

Nearly direct-access to the GPU is also done through a little C++ API called DirectX.

https://msdn.microsoft.com/en-us/library/windows/desktop/dn7...

DirectX is very C++, using namespaces and stuff. Its a bit wonky because DirectX itself is older than C++98, but its clearly a C++-based API. Its very efficient and performant too.

Re:Practical Guide to Bare Metal C++ by microcolonel on Friday June 02, 2017 @05:03PM (#14473294)
> Nearly direct-access to the GPU

Not sure what you consider "near", but I certainly wouldn't consider even Direct3D 12 to be anywhere "near" direct access to the GPU. It doesn't expose the shader ISA, it doesn't expose the command stream format, it doesn't expose the register sets.

The user mode scheduler is not the system scheduler, thus my statement holds.

Re:Practical Guide to Bare Metal C++ by dragontamer on Friday June 02, 2017 @05:14PM (#14473357)
> Not sure what you consider "near", but I certainly wouldn't consider even Direct3D 12 to be anywhere "near" direct access to the GPU. It doesn't expose the shader ISA, it doesn't expose the command stream format, it doesn't expose the register sets.

Of course, none of those are important.

The important bit to expose are exposed. IE: The memory-model of the GPU. CPU memory space vs GPU memory space, such as Residency: https://msdn.microsoft.com/en-us/library/windows/desktop/mt1....

Indeed, the ability for C++ to create abstractions that can track memory spaces in DirectX is proof positive that C++ has useful features applicable to the OS developer.

https://msdn.microsoft.com/en-us/library/windows/desktop/mt6...

-------

Note that both CUDA and OpenCL support C++ features as well. The RAII feature of C++ alone is a huge benefit to anybody tracking what bits are where in OS settings. Have you tried to use C++ in the last 10 years?