some problems of when compiling IDL with dice tools

Bjoern Doebel doebel at os.inf.tu-dresden.de
Wed Jan 17 12:42:55 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

chenggh wrote:
> On Wednesday 17 January 2007 15:44, you wrote:
>> chenggh wrote:
>>> Hi:
>>> 	In the idl file i defined an interface including a function declaration
>>> like this:
>>> 	int foo([in] arg1, [in] void *( * start_routine)(void *), [in] arg2);
>>>
>>> 	My aim is to define a method which includes a function pointer I define
>>> the function name and function parameters by myself. But when I compile
>>> there is error.
>>>
>>> 	I checked out the dice manual there is nothing about how to deal with
>>> function pointer in idl file.  Is this style supported by dice IDL ? If
>>> it supports how could I do?
>> What exactly are you trying to do?
> 	I try to encapsulate the pthread function with some l4 thread functions. In 
> Linux the pthread definition is like this:
> 	int pthread_create (pthread_t *__restrict __threadp,
>                            __const pthread_attr_t *__restrict __attr,
>                            void *(*__start_routine) (void *),
>                            void *__restrict __arg) __THROW;
> 	So in IDL file I define the similar style but compilation has some errors. 
> Maybe I must consider other solutions.

Why do you need an IDL interface for starting a thread? Can't this just be
implemented as a C function? You can have a look at l4/pkg/thread to see
how the L4 thread library is implemented.

 Bjoern
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFrgu/P5ijxgQLUNkRAjUNAJ4h4VwnevgtTlxTXnYaz2s7/SwHoACfRjmj
ExnO96FlWr/PL7I0fDYNRa8=
=9dYs
-----END PGP SIGNATURE-----




More information about the l4-hackers mailing list