diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-11-02 11:31:08 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-11-02 11:31:08 +0000 |
commit | fc25fa746ebdab5801f38d0d63fab3f5126a4274 (patch) | |
tree | c63cf845c19451edecfbbad46615b03287dc143d | |
parent | 68700e7f4dc10998c73ddbc387fd5dcb2815fb1c (diff) |
INTEGRATION: CWS os2port02 (1.3.4); FILE MERGED
2007/10/08 14:26:47 obr 1.3.4.2: RESYNC: (1.3-1.4); FILE MERGED
2007/09/30 11:54:50 ydario 1.3.4.1: Issue number: i82034
Submitted by: ydario
Reviewed by: ydario
Commit of changes for OS/2 CWS source code integration.
-rw-r--r-- | sal/osl/os2/interlck.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/sal/osl/os2/interlck.c b/sal/osl/os2/interlck.c index 01c2e5cae..3520183d5 100644 --- a/sal/osl/os2/interlck.c +++ b/sal/osl/os2/interlck.c @@ -4,9 +4,9 @@ * * $RCSfile: interlck.c,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: vg $ $Date: 2007-09-25 09:49:38 $ + * last change: $Author: hr $ $Date: 2007-11-02 12:31:08 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -33,6 +33,8 @@ * ************************************************************************/ +#include <386/builtin.h> + #include "system.h" #include <osl/interlck.h> @@ -43,13 +45,7 @@ /*****************************************************************************/ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount) { - oslInterlockedCount Count; - - DosEnterCritSec(); - Count = ++(*pCount); - DosExitCritSec(); - - return (Count); + return __atomic_increment_s32( pCount); } /*****************************************************************************/ @@ -57,13 +53,7 @@ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* /*****************************************************************************/ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* pCount) { - oslInterlockedCount Count; - - DosEnterCritSec(); - Count = --(*pCount); - DosExitCritSec(); - - return (Count); + return __atomic_decrement_s32( pCount); } |