v/examples/thread_safety
2024-10-22 11:36:38 +03:00
..
.gitignore examples: add a thread_safety/ folder with several examples of using different thread synchronisation mechanisms (#22561) 2024-10-18 13:14:11 +03:00
atomic_counter.v examples: fix some of the instructions in examples/thread_safety/ (#22571) 2024-10-22 11:36:38 +03:00
concurrent_shared_data.v examples: add a thread_safety/ folder with several examples of using different thread synchronisation mechanisms (#22561) 2024-10-18 13:14:11 +03:00
queue.v examples: fix some of the instructions in examples/thread_safety/ (#22571) 2024-10-22 11:36:38 +03:00
readme.md examples: fix some of the instructions in examples/thread_safety/ (#22571) 2024-10-22 11:36:38 +03:00

Run

v -prod  -gc none -cc gcc ./queue.v && \
./queue

Valgrind

# Helgrind: a tool for detecting synchronisation errors in programs that use the POSIX pthreads threading primitives.
valgrind --tool=helgrind ./queue

# DRD: a tool for detecting errors in multithreaded programs. The tool works for any program that uses the POSIX threading primitives or that uses threading concepts built on top of the POSIX threading primitives. 
valgrind --tool=drd ./queue