Little book of Semaphores https://greenteapress.com/semaphores/LittleBookOfSemaphores.pdf
https://preshing.com/20150316/semaphores-are-surprisingly-versatile/
Building a Condvar using Futex https://www.remlab.net/op/futex-condvar.shtml
Little book of Semaphores https://greenteapress.com/semaphores/LittleBookOfSemaphores.pdf
https://preshing.com/20150316/semaphores-are-surprisingly-versatile/
Building a Condvar using Futex https://www.remlab.net/op/futex-condvar.shtml
| const assert = std.debug.assert; | |
| // uses reflection to byte-swap all members of a packed struct | |
| // layout is preserved | |
| fn byte_swap_all_members(comptime T: type, struct_pointer: *T) void { | |
| comptime assert(@typeInfo(T).Struct.layout != .Auto); | |
| comptime assert(@mod(@bitSizeOf(T), 8) == 0); | |
| var raw_bytes = @ptrCast([*]u8, std.mem.asBytes(struct_pointer)); | |
| comptime var start_index: u32 = 0; | |
| inline for (std.meta.fields(T)) |field| { | 
sudo apt-get install build-essential| // BluetoothLowEnergy.cpp : Defines the entry point for the console application. | |
| // | |
| #include "stdafx.h" | |
| #pragma warning (disable: 4068) | |
| #include <windows.h> | |
| #include <stdio.h> | |
| #include <tchar.h> |