POSIX queue, libnfc-llcp and Mac OS X

162 views
Skip to first unread message

Ludovic Rousseau

unread,
May 19, 2012, 2:41:41 PM5/19/12
to nfc-...@googlegroups.com
Hello,

libnfc-llcp uses POSIX queue (mqueue.h [1]) and this is not provided
on Mac OS X. See also issue #75 "Compile libnfc-llcp on MacOS X 10.7"
[2].
I use a Mac so I need a solution :-)

Since I am new to NFC and this project I have now idea why queues are
used. I guess it is an Inter Process Mechanism. Exact?

Do sockets can be used instead?
Are queues mandatory? Why?

Regards,

[1] http://pubs.opengroup.org/onlinepubs/009695399/basedefs/mqueue.h.html
[2] http://code.google.com/p/nfc-tools/issues/detail?id=75

--
 Dr. Ludovic Rousseau

Romuald Conty

unread,
May 20, 2012, 6:43:52 PM5/20/12
to nfc-...@googlegroups.com, Ludovic Rousseau
Hello,

Le samedi 19 mai 2012 20:41:41 Ludovic Rousseau a écrit :
> libnfc-llcp uses POSIX queue (mqueue.h [1]) and this is not provided
> on Mac OS X. See also issue #75 "Compile libnfc-llcp on MacOS X 10.7"
> [2].
> I use a Mac so I need a solution :-)
>
> Since I am new to NFC and this project I have now idea why queues are
> used. I guess it is an Inter Process Mechanism. Exact?
True. Threads use mqueue to transmit messages.

> Do sockets can be used instead?
AFAIK, yes. I already have a short discussion with Romain about turning mqueue
to sockets, that need a bit of work but should be more portable.

PS: Romain is the best placed to reply as he is the main author, but he is not
available for few days.


--
Romuald

Romain Tartière

unread,
May 21, 2012, 3:56:11 AM5/21/12
to nfc-...@googlegroups.com
Hi

On Mon, May 21, 2012 at 12:43:52AM +0200, Romuald Conty wrote:
> Hello,
>
> Le samedi 19 mai 2012 20:41:41 Ludovic Rousseau a écrit :
> > libnfc-llcp uses POSIX queue (mqueue.h [1]) and this is not provided
> > on Mac OS X. See also issue #75 "Compile libnfc-llcp on MacOS X 10.7"
> > [2].
> > I use a Mac so I need a solution :-)
> >
> > Since I am new to NFC and this project I have now idea why queues are
> > used. I guess it is an Inter Process Mechanism. Exact?
> True. Threads use mqueue to transmit messages.

Each LLC Service, the LLC layer and the MAC layer are independent.
POSIX message queues are really near to the description of the
communication between these layers so using them was quite
straightforward (messages queues are really easy to use, sockets are
more powerful but also more complex).

> > Do sockets can be used instead?
> AFAIK, yes. I already have a short discussion with Romain about turning mqueue
> to sockets, that need a bit of work but should be more portable.
It should be possible to use socket or even pipes in place of message
queues.

Romain

--
Romain Tartière <rom...@blogreen.org> http://romain.blogreen.org/
pgp: 8234 9A78 E7C0 B807 0B59 80FF BA4D 1D95 5112 336F (ID: 0x5112336F)
(plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)
Reply all
Reply to author
Forward
0 new messages