sdl - suspend/resume thread

This is a discussion on sdl - suspend/resume thread within the C Programming forums, part of the General Programming Boards category; is there a way to suspend/resume a thread with the sdl functions (simple directmedia layer)? i need one thread to ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    244

    sdl - suspend/resume thread

    is there a way to suspend/resume a thread with the sdl functions (simple directmedia layer)?

    i need one thread to be able to suspend another one.

    thx in advance
    signature under construction

  2. #2
    Registered User
    Join Date
    Sep 2004
    Posts
    197
    Tell us why it needs to be suspended, might be able to come up with a better answer then.
    If any part of my post is incorrect, please correct me.

    This post is not guarantied to be correct, and is not to be taken as a matter of fact, but of opinion or a guess, unless otherwise noted.

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    244
    i just want the suspend and resume functionality from windows - and if possible with sdl.
    ive found source code for a suspend and resume function based on pthreads and signals - but that code is rather complicated (it works fine though). since i don't wanna mix pthread and sdl-threads i wonder if its possible to write these two routines using sdl functions.

    on second thought, i guess such s/r functions wouldnt be that safe anyway.
    like forcing a thread to suspend in a critical state (e.g. after it locked some resource) may cause unwanted behaviour.

    so i guess s/r should be more something like a hint to another thread - and the other thread should decide when its safe to suspend (instead of being forced to).

    i guess i just want s/r for completeness
    signature under construction

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Terminating secondary thread from another thread
    By wssoh85 in forum C++ Programming
    Replies: 13
    Last Post: 12-19-2008, 05:14 AM
  2. Thread Prog in C language (seg fault)
    By kumars in forum C Programming
    Replies: 22
    Last Post: 10-09-2008, 02:17 PM
  3. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 09:56 AM
  4. pointer to main thread from worker thread?
    By draegon in forum C++ Programming
    Replies: 2
    Last Post: 10-27-2005, 07:35 AM
  5. Critical Sections, destroying
    By Hunter2 in forum Windows Programming
    Replies: 4
    Last Post: 09-02-2003, 11:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21