Added atomic_pointer_get().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25324 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-05-06 03:30:25 +00:00
parent c38af24cea
commit 22c6962959

View File

@ -37,6 +37,17 @@ atomic_pointer_set(PointerType** _pointer, const PointerType* set)
#endif
}
template<typename PointerType> PointerType*
atomic_pointer_get(PointerType** _pointer)
{
#if LONG_MAX == INT_MAX
return (PointerType*)atomic_get((vint32*)_pointer);
#else
return (PointerType*)atomic_get64((vint64*)_pointer);
#endif
}
#endif // __cplusplus
#endif /* _KERNEL_UTIL_ATOMIC_H */