Created
September 8, 2016 18:01
-
-
Save IshJ/423e97e1c28d8fa9553eb71e47904478 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
threadOperation(){ | |
. | |
. | |
. | |
if(memberFunction){ | |
pthread_rwlock_rdlock(&rwlock); | |
Member(random_value, head); | |
pthread_rwlock_unlock(&rwlock); | |
} | |
if(insertFunction){ | |
pthread_rwlock_wrlock(&rwlock); | |
Insert(random_value, &head); | |
pthread_rwlock_unlock(&rwlock); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment