Punch in day 14: 09 | take a look at Linux: how to realize Linux spin lock and semaphore?
(the 14th day of punch in on November 25, 2021)
Learn this section to find out how Linux spinlocks and semaphores are implemented.
1. How to implement atomic variables in Linux
typedef struct {
int counter;
} atomic_t;//Common 32-bit atomic variable types
#ifdef CONFIG_64BIT
typedef struct {
s64 counter;
} atomic64_t;//64 bit ...
Posted by ROCKINDANO on Thu, 25 Nov 2021 02:17:48 +0100