meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| programming:c:atomic [2024/11/27 17:30] – niziak | programming:c:atomic [2025/02/03 08:42] (current) – niziak | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| > It is used to provide synchronization within threads in programs. Unlike '' | > It is used to provide synchronization within threads in programs. Unlike '' | ||
| > '' | > '' | ||
| - | |||
| [[https:// | [[https:// | ||
| + | |||
| + | |||
| + | <code c> | ||
| + | #include < | ||
| + | |||
| + | atomic_flag busy; | ||
| + | |||
| + | if (atomic_flag_test_and_set(& | ||
| + | return APP_ERR_BUSY; | ||
| + | } | ||
| + | ... | ||
| + | atomic_flag_clear(& | ||
| + | </ | ||
| ===== atomic vars ===== | ===== atomic vars ===== | ||