From liblfds.org
Revision as of 14:07, 4 January 2015 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Source Files



void abstraction_thread_wait( thread_state_t thread_state );


thread_state_t *thread_state

The address of a thread_state_t which has been initialised by abstration_thread_start.

Return Value

No return value.


This function provides the test program with a way to wait until a thread terminates.


Under Windows (32-bit and 64-bit), using the Microsoft C compiler, the function WaitForSingleObject is used to create threads and this function has following prototype;

DWORD WINAPI WaitForSingleObject( __in HANDLE hHandle, __in DWORD dwMilliseconds );

As such, the implementation of lfds610_abstraction_thread_wait() on all Windows, for all CPUs, using the Microsoft C compiler, looks like this;

#if (defined _WIN32 && defined _MSC_VER)

  /* TRD : any Windows on any CPU with the Microsoft C compiler

           _WIN32    indicates 64-bit or 32-bit Windows
           _MSC_VER  indicates Microsoft C compiler

  void abstraction_thread_wait( thread_state_t thread_state )
    WaitForSingleObject( thread_state, INFINITE );



See Also