- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to implement bariier of threads in language c or c++.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you mean a memory barrier or a thread synchronization barrier?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To implement a threading barrier, I recommend using OpenMP (see www.openmp.orgfor a specification). The Intel, Gnu, and Microsoft compilers all have OpenMP support in C/C++. These allow you to create threads with a simple pragma and synchronize them all with another simple pragma. Check your compiler documentation and search for the term "barrier" for details.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page