[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] nanosleep
On Sun, 20 Jan 2013 22:37:30 , Ole <ole@monochrom.net> wrote:
> Am Sonntag, den 20.01.2013, 21:58 +0100 schrieb Peter Slegg
> <p.slegg@scubadivers.co.uk>:
>
>
> > I believe it is a function in mintlib.
> >
> > I reduce msleep.c to a simpler version. What does it have to include
> > to be able to use nanosleep ?
>
> nanosleep() in mintlib uses select() ... I'm in doubt, because
> I would expect that nanosleep() is blocking and implemented as an
> CPU loop or something like that. But I don't know about nanosleep()
> requirements, it's just a guess.
>
> Anyway, on MiNT it requires select() - so maybe you need to
> #include <sys/select.h> ?
>
> Otherwise you can probably copy the nanosleep from the mintlib
> and paste it into the sources of the tool, when all other
> things fail....
>
> But it doesn't look like there is much to link with nanosleep()
> so you should make sure that you really have an up-to-date mintlib.
> Did you add -Wl-t to LDFLAGS before linking? THat way you can see
> which mintlib from which path is linked...
>
>
> Greets,
> Ole
>
>
It's probably the makefile I've created. I suspect I need to INCLUDE
more:
WARN = \
###-Wall \
-Wmissing-prototypes \
-Wshadow \
-Wpointer-arith \
-Wcast-qual \
-Wimplicit-function-declaration ###-Werror
INCLUDE = -I/usr/GEM/include
CFLAGS = $(INCLUDE) $(WARN) $(OPTS) $(DEFS)
ASFLAGS = $(OPTS)
LDFLAGS = -Wl -t
LIBS = -L/usr/GEM/lib -lgem
OBJDIR = obj$(CPU:68%=.%)