xesf / prequengine

merged into twin-e project
GNU General Public License v2.0
2 stars 0 forks source link

Conflicting declaration of function delay() #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Issue description:
Compilation error in QNX OS due to the conflicting declaration of function 
delay() in sdlengine.* as this function already exists. It would be great if 
the function delay() will be renamed in Prequengine.

What version of the engine are you using? On what operating system?
sdlengine.c 179 2011-12-14, compiled for QNX OS

Please provide any additional information below.

QNX Neutrino RTOS > C Library Reference > D

delay()

Suspends a calling thread for a given length of time

Synopsis:
#include <unistd.h>

unsigned int delay( unsigned int duration );

Arguments:
duration
The number of milliseconds for which to suspend the calling thread from 
execution.

Library:
libc

Use the -l c option to qcc to link against this library. This library is 
usually included automatically.

Description:
The delay() function suspends the calling thread for duration milliseconds.

The suspension time may be greater than the requested amount, due to the nature 
of time measurement (see the Tick, Tock: Understanding the Neutrino 
Microkernel's Concept of Time chapter of the QNX Neutrino Programmer's Guide), 
or due to the scheduling of other, higher-priority threads by the system.

Returns:
0 for success, or the number of unslept milliseconds if interrupted by a signal.

Errors:
If an error occurs, errno is set to:

EAGAIN
No timer resources were available to satisfy the request.

Examples:
#include <unistd.h>
#include <stdlib.h>

void play_sound( void )
{
    …
}

void stop_sound( void )
{
    …
}

int main( void )
{
    play_sound();
    delay( 500 );  /* delay for 1/2 second */
    stop_sound();

    return EXIT_SUCCESS;
}

Classification:
QNX 4

Safety:  
Cancellation point  Yes
Interrupt handler   No
Signal handler  Yes
Thread  Yes

Parent topic: D
alarm()
errno
nanosleep()
nap()
napms()
sleep()
usleep()
Clocks, Timers, and Getting a Kick Every So Often
chapter of Getting Started with QNX Neutrino
Tick, Tock: Understanding the Neutrino Microkernel's Concept of Time
chapter of the QNX Neutrino Programmer's Guide

Copyright | Community

Original issue reported on code.google.com by xla...@gmail.com on 19 Dec 2011 at 6:41

GoogleCodeExporter commented 9 years ago
I've been using Mac OS X and Windows 7 in the last commits, also used linux in 
the past and never got that issue. Anyway, I just renamed the delay() function 
to sdldelay(). Hope this will fix the issue.
Thanks for let me know.

Original comment by alexandrefontoura@gmail.com on 19 Dec 2011 at 2:14