The purpose of this assignment is to gain some familiarity with using pthreads, and to implement a message passing mechanism between threads. You should create a process with two threads - one thread will be the sender and the other thread will be the receiver. The message should consist of a character string, passed as a pointer to the receiving thread. This string should be input via the sending thread, placed in a buffer that is accessible to both threads, and then retrieved by the receiving thread and printed. The sending and receiving processes should protect the buffer operations with semaphores, to provide the necessary synchronization to avoid any race conditions.
-
Notifications
You must be signed in to change notification settings - Fork 3
yesoun/Message-Passing-Threads
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
threads message passing in C using -lpthread
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published