Om,

Thanks! This fixes make pc. I'm able to compile as well as run
simulations with this. The other programs I had tried out, were using
the same pthread.h as TOSSIM. They are working even with the modified
pthread.h. So it seems that the problem must be with something TinyOS is
doing.

Thanks,
Nupur.

On Tue, 2006-10-17 at 11:03 -0700, Omprakash Gnawali wrote:
> > On Oct 13, 2006, at 12:17 PM, Nupur Kothari wrote:
> >
> > > Phil,
> > >
> > > Thanks for your response. I have tried out pthread.h with other C
> > > programs, and everything works just fine then. Any clues as to what
> > > might be going on?
> >
> >
> > What does that line of pthread.h say?
> >
> > My only thought would be that something in the TOSSIM source is  
> > somehow defining a constant which is named in pthread.h.
> >
> > Phil
> 
> In your /usr/include/pthread.h, if you see something like:
> 
> typedef struct
> {
>   struct
>   {
>     __jmp_buf __cancel_jmp_buf;
>     int __mask_was_saved;
>   } __cancel_jmp_buf[1];
>   void *__pad[4];
> } __pthread_unwind_buf_t __attribute__ ((__aligned__));
> 
> 
> change it to something like this (explicit constant alignment):
> 
> typedef struct
> {
>   struct
>   {
>     __jmp_buf __cancel_jmp_buf;
>     int __mask_was_saved;
>   } __cancel_jmp_buf[1];
>   void *__pad[4];
> } __pthread_unwind_buf_t __attribute__ ((__aligned__(32)));
> 
> (Search any other instances of __aligned__ and make similar fixes.)
> 
> Let us know if it compiles and the simulation runs. If this works and
> if your other pthread programs that include the same header file do
> not work, I would say your compiler probably is not able to fill up
> the maximum alignment for your platform. Do your other pthread
> programs include the same header file? Maybe different pthread.h? If
> they include the same header file, this error might be triggered by
> something in TinyOS: code, make system, compiler configuration
> etc. These are just wild guesses.
> 
> Thanks.
> 
> - om_p

_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to