2011-03-08 09:44 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbvm.h
* harbour/src/vm/hvm.c
* added new public C function:
HB_BOOL hb_vmRequestReenterExt( void );
hb_vmRequestReenterExt() checks if given thread has registered HVM
stack and if not it creates new one otherwise it makes the same
operations as hb_vmRequestReenter(). It should be also used with
hb_vmRequestRestore() which checks if new stack was allocated and
if yes then it releases it.
For ST HVM hb_vmRequestReenterExt() works exactly like
hb_vmRequestReenter().
* harbour/include/hbthread.h
! typo in comment
* harbour/contrib/hbwin/win_svc.c
! fixed to work with MT HVM
+ accept function symbol (@func()) as 2-nd parameter of
WIN_SERVICESTART() function
* replaced one HB_TCHAR_*() function by Harbour STR API one.
(for full UNICODE support we should eliminate all HB_TCHAR_*()
functions)
This commit is contained in:
@@ -374,7 +374,7 @@ extern HB_EXPORT void hb_threadReleaseCPU( void );
|
||||
extern HB_EXPORT void hb_atomic_set( volatile HB_COUNTER * pCounter, HB_COUNTER value );
|
||||
extern HB_EXPORT HB_COUNTER hb_atomic_get( volatile HB_COUNTER * pCounter );
|
||||
extern HB_EXPORT void hb_atomic_inc( volatile HB_COUNTER * pCounter );
|
||||
extern HB_EXPORT HB_BOOL hb_atomic_dec( volatile HB_COUNTER * pCounter ); /* returns HB_TRUE when counter reach after decrementation */
|
||||
extern HB_EXPORT HB_BOOL hb_atomic_dec( volatile HB_COUNTER * pCounter ); /* returns HB_TRUE when counter reaches 0 after decrementation */
|
||||
|
||||
/* Critical sections or fast non recursive MUTEXes */
|
||||
extern HB_EXPORT void hb_threadEnterCriticalSection( HB_CRITICAL_T * critical );
|
||||
|
||||
@@ -129,12 +129,17 @@ extern HB_EXPORT void hb_vmRequestEndProc( void );
|
||||
extern HB_EXPORT HB_USHORT hb_vmRequestQuery( void );
|
||||
extern HB_EXPORT HB_BOOL hb_vmRequestReenter( void );
|
||||
extern HB_EXPORT void hb_vmRequestRestore( void );
|
||||
extern HB_EXPORT HB_BOOL hb_vmRequestReenterExt( void );
|
||||
|
||||
extern HB_EXPORT HB_BOOL hb_vmIsActive( void );
|
||||
|
||||
/* Return values of hb_vmRequestQuery() */
|
||||
#define HB_QUIT_REQUESTED 1 /* immediately quit the application */
|
||||
#define HB_BREAK_REQUESTED 2 /* break to nearest RECOVER/END sequence */
|
||||
#define HB_ENDPROC_REQUESTED 4 /* immediately return from procedure (error handler in macro evaluation) */
|
||||
#define HB_QUIT_REQUESTED 1 /* immediately quit the application */
|
||||
#define HB_BREAK_REQUESTED 2 /* break to nearest RECOVER/END sequence */
|
||||
#define HB_ENDPROC_REQUESTED 4 /* immediately return from procedure (error handler in macro evaluation) */
|
||||
#ifdef _HB_API_INTERNAL_
|
||||
#define HB_VMSTACK_REQUESTED 0x100 /* inetrnel flag to signal thread local stack */
|
||||
#endif
|
||||
|
||||
/* Public PCode functions */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user