Welcome to the Linux Foundation Forum!

suspend other posix thread(s)

I just got this fancy application called `ags` see sourceforge.net/p/ags

During compilation I get the following error:

ags-ags_thread.o: In function `ags_thread_real_timelock':

/home/joel/ags-code/./src/ags/thread/ags_thread.c:1620: undefined reference to `pthread_suspend'

/home/joel/ags-code/./src/ags/thread/ags_thread.c:1660: undefined reference to `pthread_resume'

because the listed functions don't exist on debian GNU/Linux. How can I install the pthread library that provides those functions ...

Comments

  • Now I write a module that uses pth instead of pthread library.
  • Posts: 54
    edited July 2014
    The code looks like following:
    1. void
    2. ags_thread_suspend_handler(int sig)
    3. {
    4. #ifdef AGS_DEBUG
    5. g_message("thread suspend\0");
    6. #endif
    7.  
    8. if(ags_thread_self == NULL)
    9. return;
    10.  
    11. if ((AGS_THREAD_SUSPENDED & (g_atomic_int_get(&(ags_thread_self->flags)))) != 0) return;
    12.  
    13. g_atomic_int_or(&(ags_thread_self->flags),
    14. AGS_THREAD_SUSPENDED);
    15.  
    16. ags_thread_suspend(ags_thread_self);
    17.  
    18. do sigsuspend(&(ags_thread_self->wait_mask)); while ((AGS_THREAD_SUSPENDED & (g_atomic_int_get(&(ags_thread_self->flags)))) != 0);
    19. }

    And is triggered like this:
    1. pthread_kill(thread_id, AGS_THREAD_RESUME_SIG);

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training