Skip to content

hennessytj/Semaphore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

compilation: % gcc sem.c -lpthread execution: % /a.out

Parameters

There are no command line parameters. If you would like to change the number of threads or the number of shared resources go to sem.h.

Misc.

The file sem.c contains the source code which includes: semaphore operations, pthread operations, i.e., what I believe is required for this program.

The file sem.h contains macros and struct defintions. This is the file you should open to change the number of resources or threads in play. To test as a binary semaphore, set N to 1. To test as a counting semaphore, set N to any number > 1.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages