Hi there! I can make 3 versions, one with “Panic Messages”, the second one with semaphores and one with a lock based on testandset. I'll write it in C, nice code with comments. Is that what you want?
If you confirm this soon enough, I can do it tomorrow and you'll have it ready in the evening. If you want, we can have a short call on skype and discuss details.
Regards,
Wojtek Dziewięcki