lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Feb 04, 2005, at 04:15, skaller wrote:

I'm not quite sure how to deal with the "busy wait" introduced by the
dispatcher run loop though. Ideally the dispatching should be based on
some kind of events. But at first glance I don't quite see how to pull
this out using only Lua itself... ideas much appreciated :)

The right way to do this requires pthreads and an OS alarm.

I stumbled upon Luiz Henrique de Figueiredo's treasure trove:

http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/

One of his Lua library being "lalarm", an alarm library for Lua based on signal and SIGALRM.

This sounds exactly like what I would need, right?

I would love to give the above library a spin, however I'm quite at loss on how to compile and install it :/

I tried to follow Luiz's instruction at "Installing my Lua Libraries":

http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/install.html

... but without much success so far:

% make
cc -I/usr/local/include -ansi -pedantic -Wall -O2 -c -o lalarm.o lalarm.c
cc -o lalarm.so -shared lalarm.o
cc: unrecognized option `-shared'
ld: Undefined symbols:
_main
_lua_call
_lua_error
_lua_gethook
_lua_gethookmask
_lua_gettable
_lua_gettop
_lua_pushcclosure
_lua_pushlstring
_lua_pushnil
_lua_pushnumber
_lua_pushvalue
_lua_setfield
_lua_sethook
_lua_settable
_lua_tonumber
_lua_type
make: *** [lalarm.so] Error 1

Does anyone has a make file for Mac OS X?

For the record, I'm using lua-5.1-work4 on Mac OS X 10.3.7.

Thanks!
Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/