followed Ingo's suggestion and introduced HAIKU_HOST_PLATFORM_64_BIT macro
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21431 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -8,6 +8,10 @@ typedef unsigned long haiku_build_addr_t;
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef __x86_64__
|
||||||
|
#define HAIKU_HOST_PLATFORM_64_BIT
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -3199,8 +3199,13 @@ common_lock_node(int fd, bool kernel)
|
|||||||
|
|
||||||
// We need to set the locking atomically - someone
|
// We need to set the locking atomically - someone
|
||||||
// else might set one at the same time
|
// else might set one at the same time
|
||||||
|
#ifdef HAIKU_HOST_PLATFORM_64_BIT
|
||||||
|
if (fssh_atomic_test_and_set64((vint64_t *)&vnode->mandatory_locked_by,
|
||||||
|
(fssh_addr_t)descriptor, 0) != 0)
|
||||||
|
#else
|
||||||
if (fssh_atomic_test_and_set((vint32_t *)&vnode->mandatory_locked_by,
|
if (fssh_atomic_test_and_set((vint32_t *)&vnode->mandatory_locked_by,
|
||||||
(fssh_addr_t)descriptor, 0) != 0)
|
(fssh_addr_t)descriptor, 0) != 0)
|
||||||
|
#endif
|
||||||
status = FSSH_B_BUSY;
|
status = FSSH_B_BUSY;
|
||||||
|
|
||||||
put_fd(descriptor);
|
put_fd(descriptor);
|
||||||
@@ -3222,7 +3227,7 @@ common_unlock_node(int fd, bool kernel)
|
|||||||
|
|
||||||
// We need to set the locking atomically - someone
|
// We need to set the locking atomically - someone
|
||||||
// else might set one at the same time
|
// else might set one at the same time
|
||||||
#ifdef __x86_64__
|
#ifdef HAIKU_HOST_PLATFORM_64_BIT
|
||||||
if (fssh_atomic_test_and_set64((vint64_t *)&vnode->mandatory_locked_by,
|
if (fssh_atomic_test_and_set64((vint64_t *)&vnode->mandatory_locked_by,
|
||||||
0, (fssh_addr_t)descriptor) != (int64_t)descriptor)
|
0, (fssh_addr_t)descriptor) != (int64_t)descriptor)
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user