diff options
| author | rpj <rpj> | 2007-01-05 01:19:56 +0000 | 
|---|---|---|
| committer | rpj <rpj> | 2007-01-05 01:19:56 +0000 | 
| commit | eeef426b8399ad39dfc759352a6e7b0348a047d1 (patch) | |
| tree | 09565a10b3132311847c8fb4575313f9d645d476 /tests | |
| parent | a7ed60cf396fcb8b0670e097dda24b1b0ec2e904 (diff) | |
Added more Win64 support
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ChangeLog | 5 | ||||
| -rw-r--r-- | tests/context1.c | 6 | ||||
| -rw-r--r-- | tests/once3.c | 11 | 
3 files changed, 11 insertions, 11 deletions
| diff --git a/tests/ChangeLog b/tests/ChangeLog index 6b2c742..30f6ccb 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2007-01-04  Ross Johnson <Ross dot Johnson at homemail dot com dot au> + +        * context1.c: Include context.h from library sources and remove +        x86 dependence in main(). +  2005-06-12  Ross Johnson  <rpj@callisto.canberra.edu.au>  	* stress1.c (millisecondsFromNow): Remove limit 0 <= millisecs < 1000; diff --git a/tests/context1.c b/tests/context1.c index 090df9c..e63dbec 100644 --- a/tests/context1.c +++ b/tests/context1.c @@ -75,6 +75,7 @@  #include "test.h"  #include "../implement.h" +#include "../context.h"  static int washere = 0; @@ -122,10 +123,7 @@ main()        context.ContextFlags = CONTEXT_CONTROL;        GetThreadContext(hThread, &context); -      /* -       *_x86 only!!! -       */ -      context.Eip = (DWORD) anotherEnding; +      PTW32_PROGCTR (context) = (DWORD_PTR) anotherEnding;        SetThreadContext(hThread, &context);        ResumeThread(hThread);      } diff --git a/tests/once3.c b/tests/once3.c index 981bbf7..51d2daa 100644 --- a/tests/once3.c +++ b/tests/once3.c @@ -34,7 +34,7 @@   * --------------------------------------------------------------------------   *   * Create several pthread_once objects and channel several threads - * through each. Make the init_routine cancelable and cancel them with + * through each. Make the init_routine cancelable and cancel them   * waiters waiting.   *   * Depends on API functions: @@ -45,8 +45,6 @@   *      pthread_once()   */ -#define ASSERT_TRACE -  #include "test.h"  #define NUM_THREADS 100 /* Targeting each once control */ @@ -68,7 +66,6 @@ myfunc(void)  {    EnterCriticalSection(&numOnce.cs);    numOnce.i++; -  assert(numOnce.i > 0);    LeaveCriticalSection(&numOnce.cs);    /* Simulate slow once routine so that following threads pile up behind it */    Sleep(10); @@ -81,11 +78,11 @@ mythread(void * arg)  {    /*     * Cancel every thread. These threads are deferred cancelable only, so -   * only the thread performing the once routine (my_func) will see it (there are +   * only the thread performing the init_routine will see it (there are     * no other cancelation points here). The result will be that every thread -   * eventually cancels only when it becomes the new once thread. +   * eventually cancels only when it becomes the new initter.     */ -  assert(pthread_cancel(pthread_self()) == 0); +  pthread_cancel(pthread_self());    assert(pthread_once(&once[(int) arg], myfunc) == 0);    EnterCriticalSection(&numThreads.cs);    numThreads.i++; | 
