Re: [patch] put Lua standard libraries into the kernel

2013-11-26 Thread Marc Balmer
Am 26.11.13 02:50, schrieb Lourival Vieira Neto: Hi Folks, Here is a patch that puts some Lua standard libraries into the kernel: - Auxiliary library (C API); - Base library; - String library; - Table library. In the kernel, Lua states are created empty _on purpose_. So the Lua

Re: [patch] using luaL_register() on luacore kernel module

2013-11-26 Thread Marc Balmer
Am 26.11.13 03:26, schrieb Lourival Vieira Neto: Hi again.. Just a tiny patch to use luaL_register() on luacore kernel module. Regards You are now using the auxiliary library, which I did not include in kernel Lua on prupose (to keep stuff smaller). So what is the gain of including the

posix message queues and multiple receivers

2013-11-26 Thread Marc Balmer
What is the prupose or reasoning behind the fact that multiple processes can open a message queue for reading using mq_open()? I wrote simple mq sender and mq receiver programs; when I start multiple receivers on the same mq, and send a message to it, only one of the receivers gets the message,

Re: posix message queues and multiple receivers

2013-11-26 Thread Martin Husemann
On Tue, Nov 26, 2013 at 09:39:44AM +0100, Marc Balmer wrote: What is the prupose or reasoning behind the fact that multiple processes can open a message queue for reading using mq_open()? You can dispatch messages from one producer to several workers (one writer, multiple readers), or inject

Re: [patch] using luaL_register() on luacore kernel module

2013-11-26 Thread Lourival Vieira Neto
On Tue, Nov 26, 2013 at 6:22 AM, Marc Balmer m...@msys.ch wrote: Am 26.11.13 03:26, schrieb Lourival Vieira Neto: Hi again.. Just a tiny patch to use luaL_register() on luacore kernel module. Regards You are now using the auxiliary library, which I did not include in kernel Lua on prupose

Re: [patch] put Lua standard libraries into the kernel

2013-11-26 Thread Lourival Vieira Neto
Hi Marc, On Tue, Nov 26, 2013 at 6:18 AM, Marc Balmer m...@msys.ch wrote: Am 26.11.13 02:50, schrieb Lourival Vieira Neto: Hi Folks, Here is a patch that puts some Lua standard libraries into the kernel: - Auxiliary library (C API); - Base library; - String library; - Table library. In

Re: [patch] put Lua standard libraries into the kernel

2013-11-26 Thread Marc Balmer
Am 26.11.13 12:13, schrieb Lourival Vieira Neto: Hi Marc, On Tue, Nov 26, 2013 at 6:18 AM, Marc Balmer m...@msys.ch wrote: Am 26.11.13 02:50, schrieb Lourival Vieira Neto: Hi Folks, Here is a patch that puts some Lua standard libraries into the kernel: - Auxiliary library (C API); -

Re: posix message queues and multiple receivers

2013-11-26 Thread Mindaugas Rasiukevicius
Hi, The question is not really kernel related. Possibly tech-userlevel@, but neither it is related with NetBSD per se. Marc Balmer m...@msys.ch wrote: What is the prupose or reasoning behind the fact that multiple processes can open a message queue for reading using mq_open()? I wrote

Re: posix message queues and multiple receivers

2013-11-26 Thread Marc Balmer
Am 26.11.13 15:13, schrieb Mindaugas Rasiukevicius: Hi, The question is not really kernel related. Possibly tech-userlevel@, but neither it is related with NetBSD per se. I asked here because it is implemented in the kernel and because what I see might as well be a buglet (given that aio

Re: posix message queues and multiple receivers

2013-11-26 Thread Mindaugas Rasiukevicius
Marc Balmer m...@msys.ch wrote: Am 26.11.13 15:13, schrieb Mindaugas Rasiukevicius: Hi, The question is not really kernel related. Possibly tech-userlevel@, but neither it is related with NetBSD per se. I asked here because it is implemented in the kernel and because what I see

Re: [patch] put Lua standard libraries into the kernel

2013-11-26 Thread Lourival Vieira Neto
On Tue, Nov 26, 2013 at 9:50 AM, Marc Balmer m...@msys.ch wrote: Am 26.11.13 12:13, schrieb Lourival Vieira Neto: Hi Marc, On Tue, Nov 26, 2013 at 6:18 AM, Marc Balmer m...@msys.ch wrote: Am 26.11.13 02:50, schrieb Lourival Vieira Neto: Hi Folks, Here is a patch that puts some Lua standard

Re: posix message queues and multiple receivers

2013-11-26 Thread Mouse
Why do you think it is meant to connect only two processes? It is [...] just a FIFO queue of messages. [...] So what is the purpose of those interface? When I inject a message, I don't know which of the possibly many receivers is getting it? Right. To rephrase that, when I make a request,

Re: in which we present an ugly hack to make sys/queue.h CIRCLEQ work

2013-11-26 Thread Dennis Ferguson
On 24 Nov, 2013, at 03:37 , Mouse mo...@rodents-montreal.org wrote: [The compiler] also couldn't know if pointers whose types it did know were referring to different members of the same union, perhaps with the union declared in another compilation unit The text I have says [#5]

Re: in which we present an ugly hack to make sys/queue.h CIRCLEQ work

2013-11-26 Thread Christos Zoulas
In article 96497888-f8c7-49f2-958b-532a2093b...@gmail.com, Dennis Ferguson dennis.c.fergu...@gmail.com wrote: I think getting rid of uses of the CIRCLEQ macros was the right thing to do in any case, since code which works like that doesn't need to exist. I'm not sure that that TAILQ macros are

Re: in which we present an ugly hack to make sys/queue.h CIRCLEQ work

2013-11-26 Thread Matt W. Benjamin
What's your issue with TAILQ? Matt - Christos Zoulas chris...@astron.com wrote: In article 96497888-f8c7-49f2-958b-532a2093b...@gmail.com, Dennis Ferguson dennis.c.fergu...@gmail.com wrote: I think getting rid of uses of the CIRCLEQ macros was the right thing to do in any case,

Re: in which we present an ugly hack to make sys/queue.h CIRCLEQ work

2013-11-26 Thread Christos Zoulas
On Nov 26, 8:20pm, m...@linuxbox.com (Matt W. Benjamin) wrote: -- Subject: Re: in which we present an ugly hack to make sys/queue.h CIRCLEQ | What's your issue with TAILQ? #define TAILQ_LAST(head, headname) \ (*(((struct headname *)((head)-tqh_last))-tqh_last)) #define TAILQ_PREV(elm,

Re: in which we present an ugly hack to make sys/queue.h CIRCLEQ work

2013-11-26 Thread Matt W. Benjamin
Let me get on the record. It's basically ridiculous to allow GCC 4.8 to redefine the set of permitted C expressions such that it breaks BSD. Matt - Christos Zoulas chris...@zoulas.com wrote: On Nov 26, 8:20pm, m...@linuxbox.com (Matt W. Benjamin) wrote: -- Subject: Re: in which we

Re: in which we present an ugly hack to make sys/queue.h CIRCLEQ work

2013-11-26 Thread Mouse
Let me get on the record. It's basically ridiculous to allow GCC 4.8 to redefine the set of permitted C expressions such that it breaks BSD. gcc 4.8 isn't. C99 did; what's distinctive about gcc 4.8 is that before that gcc didn't take advantage of the leeway C99 said it had. These macros have