*/
void forb_ref_get(struct forb_ref *ref)
{
+#ifdef RTEMS
+ ++(ref->refcount);
+#else
__sync_add_and_fetch(&ref->refcount, 1);
+#endif
}
/**
*/
int forb_ref_put(struct forb_ref *ref, void (*release) (struct forb_ref *ref))
{
+#ifdef RTEMS
+ if (--(ref->refcount) == 0) {
+#else
if (__sync_add_and_fetch(&ref->refcount, -1) == 0) {
+#endif
release(ref);
return 1;
}