Author

Topic: Small questions about source code (Read 355 times)

newbie
Activity: 13
Merit: 1
June 25, 2017, 02:12:21 PM
#3
Thank you.
staff
Activity: 3374
Merit: 6530
Just writing some code
June 25, 2017, 01:23:05 PM
#2
Those are actually macros, not functions. They are defined here: https://github.com/bitcoin/bitcoin/blob/master/src/sync.h
newbie
Activity: 13
Merit: 1
June 25, 2017, 11:59:11 AM
#1
Hello everyone, I am currently going through the bitcoin source code and each of the functions etc..

I would like to know more about the LOCK() function.

I see a lot of them and while using my search function, can't seem to find it's origin.

I know it is about threads and "locking access" to certain vars but would like to read how it is implemented.

If anybody know where to find the definition of the LOCK or CRITICAL_BLOCK function, it would be greatly appreciated.

example :

 LOCK(csPathCached);
Jump to: