errors while compiling the ArdOS code

When I compile the following sketch on my 2560 Mega board it gives error: too many arguments to function void OSInit()
my sketch is as follows
please help me in this regard:

#include <ardio.h>
#include <ArdOS.h>
#include <ArdOSConfig.h>
#include <kernel.h>
#include <mutex.h>
#include <queue.h>
#include <sema.h>
#include <task.h>

#define NUM_TASKS 2 // we must know in advance how many

/* simple sleep forever task /
void task1(void
p){
while (1){
OSSleep(500);
}
}
/* simple sleep forever task /
void task2(void
p){
while(1){
OSSleep(50);
}
}
/* regular Arduino setup */
void setup()
{
OSInit(NUM_TASKS);
// Create the tasks
OSCreateTask(0, &task1, NULL);
OSCreateTask(1, &task2, NULL);
// Start the scheduler
OSRun();
}

Hi I sugest you have a read of this link
http://forum.arduino.cc/index.php/topic,148850.0.html
Particularly about using # code tags to post your code.
Is that all your code?
Where is the void loop()
{
}
part?

Tom...... :slight_smile:

udaysawant:
error: too many arguments to function void OSInit()

You're calling OSinit() with an integer argument. The error message indicates that the function doesn't take a single integer argument. You will need to check the API to see what arguments it expects, if any.