This is the mail archive of the pthreads-win32@sourceware.org mailing list for the pthreas-win32 project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
PTW32_INTERLOCKED_COMPARE_EXCHANGE to InterlockedCompareExchange in implement.h
Below is the complete patch for the Windows CE port to be applied on the CVS from 2006-11-29 9:00.
pthreads for Windows CE on ARM seems to work stable now, my xmlBlaster.org C client just processed 100000 messages with a lot of pthreads activity.
Is it possible to integrate the patch to the main trunk for release 2.8?
which are automatically set by VC++8 for the Smartphone 2003 ARMV4 target.
#if defined(WINCE) # define PTW32_PROGCTR(Context) ((Context).FpExc) #endif (see Context struct below).
regards Marcel
Marcel Ruff wrote:pthreads-2006-11-29.patchHi,Here it is: C:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\Smartphone2003\Include\winnt.h
with some minor changes the pthreads CVS snapshot from today (2006-11-28 PTW32_VERSION 2,8,0,0) compiles with
Visual C++ 8.0.5 2005 (on a XP)
for the target
Windows CE 4.2, Smartphone 2003 with ARM4 processor.
My multi threaded application seem to run fine, but it keeps getting strange return codes for
pthread_cond_destroy() pthread_mutex_destroy()
those calls return 16 (which is EBUSY) in need_errno.h. I ignore it and my applications continues as expected.
Most probably this (my) hack is the reason:
What do i have to return in pthread_cancel.c instead of FpExc?? 43a44,47 > #if defined(WINCE) > #define PTW32_PROGCTR(Context) ((Context).FpExc) > #endif (Context is defined in my winnt.h)
...
typedef struct _CONTEXT {
//
// The flags values within this flag control the contents of
// a CONTEXT record.
//
// If the context record is used as an input parameter, then
// for each portion of the context record controlled by a flag
// whose value is set, it is assumed that that portion of the
// context record contains valid context. If the context record
// is being used to modify a thread's context, then only that
// portion of the threads context will be modified.
//
// If the context record is used as an IN OUT parameter to capture
// the context of a thread, then only those portions of the thread's
// context corresponding to set flags will be returned.
//
// The context record is never used as an OUT only parameter.
//
ULONG ContextFlags;
//
// This section is specified/returned if the ContextFlags word contains
// the flag CONTEXT_INTEGER.
//
ULONG R0;
ULONG R1;
ULONG R2;
ULONG R3;
ULONG R4;
ULONG R5;
ULONG R6;
ULONG R7;
ULONG R8;
ULONG R9;
ULONG R10;
ULONG R11;
ULONG R12;
//
// This section is specified/returned if the ContextFlags word contains
// the flag CONTEXT_CONTROL.
//
ULONG Sp;
ULONG Lr;
ULONG Pc;
ULONG Psr;
#define NUM_VFP_REGS 32 #define NUM_EXTRA_CONTROL_REGS 8 // Floating point registers ULONG Fpscr; ULONG FpExc; ULONG S[NUM_VFP_REGS+1]; ULONG FpExtra[NUM_EXTRA_CONTROL_REGS];
} CONTEXT; ....
What is the role of process.h (as i have disabled it, see patch below)?
In errno.c there are pthread_self () returns pthread_t which is sometimes a pointer on a big struct, whereas in my case it ended up to typedef struct { void * p; /* Pointer to actual object */ unsigned int x; /* Extra information - reuse count etc */ } ptw32_handle_t;
How can i track this down?
thank you Marcel
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |