Implementing a Semaphore
In this vid we'll look at making a Semaphore. I'm in user mode, so I've had to rely pretty heavily on Windows functions.
I've found it is super difficult to explain and code the steps to a working Semaphore, even though they seem very simple. So I've pre-coded a lot of the stuff in this vid. That includes the allocation functions, and the functions which add and remove thread handles from the queue. I'm using ASM, but I have provided a set of little "rules", and each has pseudo-code so hopefully this is useful to anybody that's ever wondered how a Semaphore works.
I've also written a small barrier as a test program, to see if the Semaphore is working. The barrier logic is from Robert Downey's excellent "Little Book of Semaphores. If you haven't read the book go and find it, it's a free eBook and it's excellent!
Anywho, I hope this is interesting to folks, and if you find any problems with my Semaphore leave a comment.
----------Shizzle ----------
Become a patron and support What's a Creel programming vids on Patreon:
www.patreon.com/whatsacreel
FaceBook:
www.facebook.com/pages/WhatsaCreel/167732956665435
Видео Implementing a Semaphore канала Creel
I've found it is super difficult to explain and code the steps to a working Semaphore, even though they seem very simple. So I've pre-coded a lot of the stuff in this vid. That includes the allocation functions, and the functions which add and remove thread handles from the queue. I'm using ASM, but I have provided a set of little "rules", and each has pseudo-code so hopefully this is useful to anybody that's ever wondered how a Semaphore works.
I've also written a small barrier as a test program, to see if the Semaphore is working. The barrier logic is from Robert Downey's excellent "Little Book of Semaphores. If you haven't read the book go and find it, it's a free eBook and it's excellent!
Anywho, I hope this is interesting to folks, and if you find any problems with my Semaphore leave a comment.
----------Shizzle ----------
Become a patron and support What's a Creel programming vids on Patreon:
www.patreon.com/whatsacreel
FaceBook:
www.facebook.com/pages/WhatsaCreel/167732956665435
Видео Implementing a Semaphore канала Creel
Комментарии отсутствуют
Информация о видео
30 мая 2015 г. 9:04:10
00:26:38
Другие видео канала