Project

General

Profile

Revision 1039

works with 20 robots! but its incredibly slow and destroys computers
also fixed a bug in the robot creation code (it didn't init robots array to -1 after a resize)

View differences:

libsim.c
8 8
#include <sys/ipc.h>
9 9
#include <robot_shared.h>
10 10
#include <string.h>
11

  
11 12
RobotShared* shared_state;
12 13

  
13 14
void *tick(int sig)
14 15
{
15
  printf("robot process paused. suspending\n"); 
16
  printf("robot paused. suspending\n"); 
16 17

  
17 18
  if(raise(SIGTSTP)<0)
18 19
    printf("could not kill self!\n");

Also available in: Unified diff