Function report |
Source Code:lib\lockref.c |
Create Date:2022-07-28 06:19:11 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:lockref_get_or_lock - Increments count unless the count is 0 or dead*@lockref: pointer to lockref structure* Return: 1 if count updated successfully or 0 if count was zero* and we got the lock instead.
Proto:int lockref_get_or_lock(struct lockref *lockref)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct lockref * | lockref |
| 122 | Note that the "cmpxchg()" reloads the "old" value for the* failure case.(count++;If count <= 0 Then Break;, Return 1;) |
| 131 | If count <= 0 Then Return 0 |
| 133 | count++ |
| 134 | spin_unlock( & lock) |
| 135 | Return 1 |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |