-
Notifications
You must be signed in to change notification settings - Fork 233
Open
Description
Hi. I'm a researcher working on concurrent programs written in C and completely new to this project.
While reading the code, I found the following part in kvs_update:
Lines 113 to 119 in d022e83
| pthread_mutex_unlock(&k->lock); | |
| /* call function */ | |
| if (strm_funcall(strm, args[2], 1, &old, &val) == STRM_NG) { | |
| pthread_mutex_unlock(&k->lock); | |
| return STRM_NG; | |
| } |
After k->lock is released in 113, it's released again in line 117. Unless strm_funcall returns after acquiring k->lock, line 117 would not be necessary. I don't fully understand the behavior of strm_funcall, but I can't find such cases yet. I'm wondering whether line 117 is intentional and necessary or could be removed.
Thank you.
Metadata
Metadata
Assignees
Labels
No labels