You cracked it thanks a lot :) That's what I searched for.
Thanks a lot of your expertise and kind help!
Type: Posts; User: MaSSaSLaYeR
You cracked it thanks a lot :) That's what I searched for.
Thanks a lot of your expertise and kind help!
The normal out for Dining Philosopher is:
Phil 0 thinking
Phil 1 thinking
Phil 3 eating
Phil 4 thinking
Only one Phil can eat at any given time or am i wrong?
Dining philosophers problem...
If I add sleep between the line 62 and 63 I get no results else I get the following results, which I think are not right;
Philosopher 0 is eating
Philosopher 0 is thinking
Philosopher 4 is...
Edited to & still gettin' same bad results :(
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <semaphore.h>
Will try thanks :)
How can I suspend the main thread?
Could you kinly explain a little more.
Hello,
I'm givin' the Dining Phiolsophers a try to solve it with Mutexs but it's not going to well.
The Mutex initalisation works, the threads start, the VOID Philosopher must be correct since...
Thanks for your reaction I got problem with the Dining Philosophers & mutex will post in another thread :)
But it has to be threaded, can't I do a sleep or a wait to make it more determinist? The problem kinda is that the threads can run at the same but they have to stop at the same time.
Hello,
I got critisized today that this program isn't determinist?
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
struct Param
{
Thank you!
Hello!
I need to send this to my prof:
Code with makefiles or solution
Executable in Release mode (Windows)
Is
#pragma comment(lib,"Ws2_32.lib") an external dependencies?
Excuse me! First off: Everytime I cross post I link to the forum where the answer was found to the problem.
Second I only post things if I really can't find them after I for example:
Debugged...
This thread was about the ACK's to find them, now they only work in certain cases so it's a different problem
What is everyone's problem with cross posting i'm just trying to get the problem solved as fast as possible...
This is my receive code:
struct sockaddr_storage their_addr;
struct addrinfo hints, *servinfo, *p;
struct in_addr addr;
socklen_t addr_size;
int sockfd ,bindfd ,...
Is that possible in Visual Studio?
This line:
send(sockfd,(char*) &pos,4,0);
Makes XChat file transfer work 100%
But makes my own application crash.
Why??
Normally this is all handled in the application, if I look at the RFC of IRC it says:
So that is what I am doing, it's the same code that is used in xchat.
Yes mine are TCP/IP Sockets. Pff...
Hello!
Is it possible that my socket gets overflowed when he receives ACK's but not handles them?
I send an ACK:
guint32 pos = htonl (count & 0xffffffff);
send(sockfd,(char*)...
I will let you know! Damn that's a nice Pontiac, you know what I miss in Belgium these beauties:
11133
It's illegal to have in Belgium with those wheels 'naked'.
My dad and I we have an...
Thanks for the Tips I normally use Beej's Guide but I see now that it is incomplete.
I'm living at 2 place at the moment in Mechelen near Antwerp in the weekends and in the weekdays I live near...
Thanks man! Respect for Long Beach dream place to live! Much warmer then Belgium :/
I can't figure something out: It seems that I can't send my TCP Header via TCP but that it wants UDP?
The TCP...
Would this be correct:
header.th_sport= 3232267203;
header.th_dport= 2130706433;
header.th_seq= 1;
header.th_ack= 1024;
header.th_off= 20;
header.th_flags='0x10';