forcing a variable to be on the stack

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

 



Is there a way to ask gcc to force a specific variable to be stored on
the stack ? (other than write a bit of inline asm ?)

I tried something along the lines of the following (volatile on the
thread variable) and it appears to work but it's ugly and it's
probably stupid.
            {
              volatile PthreadFiberThread *thread = fiber->thread;
              pthread_cond_wait ((pthread_cond_t*)&thread->condvar,
                                           (pthread_mutex_t*)&thread->mutex);
              thread->trampoline->Jump ((PthreadFiberThread *)thread);
            }

Mathieu
-- 
Mathieu Lacage <mathieu.lacage@xxxxxxxxx>


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux