I stand corrected. thanks.
Type: Posts; User: wassat676
I stand corrected. thanks.
Thats a totally legal move, and it has nothing to do with my problem.
I know, and i did.
I have this project im working on. It will eventually be an implementation of Dijkstra's shortest path algorithm using some c++ classes and openGL to visualize it.
My problem is creating a data...
Oh, wassat676, heres your problem!
You should add another mutex so that puts/gets aren't conflicting.
Thanks me.
EDIT: nvm, now its all deterministic and stuff. I still need help.
ok I figured something out at least. I should have been using strlen in the Put method. Now it will print, almost in the correct order, but it still deadlocks at some point. Heres the new code:
...
I am implementing a circular character buffer for an assignment, the requirements are pretty strict so I can't change the logic from what it is now too much. Unfortunately, this code deadlocks right...
Didn't see that post, it is the same class tho im sure of it.
What return values are you referring to that I have not already used an assert on?
The program works but the threads aren't...
Posted this over on stack overflow, but they were no help.
This is an assignment i'm working on, it must use semaphores, not mutex.
#include <stdio.h>
#include <pthread.h>
#include...
ok i see whats happening, now my question becomes, "how do i detect the end of the file without calling fgets??"
Hello all. Im having and issue when reading from a .txt file. Some of the lines in it are being skipped by the while loop and I have no idea why. Any insight is greatly appreciated.
#include...