mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-25 13:54:05 -06:00
vault backup: 2022-08-04 11:50:35
This commit is contained in:
parent
5be3315549
commit
1d62eab5a7
@ -98,4 +98,30 @@ typedef struct
|
||||
- the scope of this routine is local to this file
|
||||
- this variable maintains its value between calls
|
||||
|
||||
```
|
||||
void keeper(void) {
|
||||
static uint64_t times_called = 0;
|
||||
times_called++;
|
||||
printf("Count:%llu\n", times_called);
|
||||
}
|
||||
```
|
||||
|
||||
## typecasting
|
||||
like java
|
||||
```
|
||||
uint64_t y = 1024;
|
||||
unit32_t x = (unit32_t) y;
|
||||
```
|
||||
|
||||
## Keywords to ignore
|
||||
- auto
|
||||
- all local variables are auto
|
||||
- register
|
||||
- deprecated
|
||||
|
||||
## keywords to think about
|
||||
- volatile
|
||||
- do not optimize accesses to this variable
|
||||
- might be changed by another thread or a harware event
|
||||
- you're likely to see this in operating system souce code
|
||||
- you're likely to see this in multithreaded programs
|
||||
|
||||
Loading…
Reference in New Issue
Block a user