aboutsummaryrefslogtreecommitdiffstats
path: root/P3
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-11-15 13:18:04 -0600
committerMatt Strapp <strap012@umn.edu>2020-11-15 13:18:04 -0600
commit4106ef6c440ffe67fd2269247fb7fc15c3e1d114 (patch)
treed3f3f79a32ade0d0e1b86bd07d7ed56bf2233176 /P3
parentAdd more, probably (diff)
downloadcsci4061-4106ef6c440ffe67fd2269247fb7fc15c3e1d114.tar
csci4061-4106ef6c440ffe67fd2269247fb7fc15c3e1d114.tar.gz
csci4061-4106ef6c440ffe67fd2269247fb7fc15c3e1d114.tar.bz2
csci4061-4106ef6c440ffe67fd2269247fb7fc15c3e1d114.tar.lz
csci4061-4106ef6c440ffe67fd2269247fb7fc15c3e1d114.tar.xz
csci4061-4106ef6c440ffe67fd2269247fb7fc15c3e1d114.tar.zst
csci4061-4106ef6c440ffe67fd2269247fb7fc15c3e1d114.zip
do things
Diffstat (limited to 'P3')
-rw-r--r--P3/server.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/P3/server.c b/P3/server.c
index 3a2a537..9aa0a5b 100644
--- a/P3/server.c
+++ b/P3/server.c
@@ -180,8 +180,11 @@ int main(int argc, char **argv) {
// Start the server
init(port);
// Create dispatcher and worker threads (all threads should be detachable)
- pthread_t thread;
- pthread_create(&thread, NULL, dispatch, NULL); // DEBUG! figure out last arg
+ pthread_t dThreads[dispatchers];
+ pthread_create(&dThreads, NULL, dispatch, NULL); // DEBUG! figure out last arg
+
+ pthread_t wThreads[workers];
+ pthread_create(&wThreads, NULL, worker, NULL); //TODO: Worker arguments.
// Create dynamic pool manager thread (extra credit A)