Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
A4-Tacks committed Sep 28, 2024
1 parent d6dcc08 commit a7c07ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ Unless otherwise specified, return the value before the memory operation
Complex Commands
-------------------------------------------------------------------------------
- **rwlock(stat, mut, block)**:
- **block**: Enable block polling until locked
- **block**: Enable block polling until locked (change `@counter`)
- **mut**: Acquire write lock (default is read lock)
- **result**: Guard value, please subtract the value of guard when releasing the lock

**Guard value by zero is acquire lock failed**


Basic Usage Examples
-------------------------------------------------------------------------------
Expand All @@ -68,6 +70,8 @@ old: 3, changed: 7
Simple Mutex Examples
-------------------------------------------------------------------------------

`lock` can also be used, which is more simple and supports multiple read locks

- `m == 0` is released
- `m == 1` is acquired

Expand Down

0 comments on commit a7c07ca

Please sign in to comment.