#include <linux/compiler.h>
+#include <linux/module.h>
#include <linux/types.h>
+
#include <asm/processor.h>
#include <asm/cmpxchg.h>
#include <asm/atomic.h>
{
return cmpxchg8b(&ptr->counter, old_val, new_val);
}
+EXPORT_SYMBOL(atomic64_cmpxchg);
/**
* atomic64_xchg - xchg atomic64 variable
return old_val;
}
+EXPORT_SYMBOL(atomic64_xchg);
/**
* atomic64_set - set atomic64 variable
{
atomic64_xchg(ptr, new_val);
}
+EXPORT_SYMBOL(atomic64_read);
/**
* atomic64_read - read atomic64 variable
return res;
}
+EXPORT_SYMBOL(atomic64_read);
/**
* atomic64_add_return - add and return
return new_val;
}
+EXPORT_SYMBOL(atomic64_add_return);
u64 atomic64_sub_return(u64 delta, atomic64_t *ptr)
{
return atomic64_add_return(-delta, ptr);
}
+EXPORT_SYMBOL(atomic64_sub_return);
u64 atomic64_inc_return(atomic64_t *ptr)
{
return atomic64_add_return(1, ptr);
}
+EXPORT_SYMBOL(atomic64_inc_return);
u64 atomic64_dec_return(atomic64_t *ptr)
{
return atomic64_sub_return(1, ptr);
}
+EXPORT_SYMBOL(atomic64_dec_return);
/**
* atomic64_add - add integer to atomic64 variable
{
atomic64_add_return(delta, ptr);
}
+EXPORT_SYMBOL(atomic64_add);
/**
* atomic64_sub - subtract the atomic64 variable
{
atomic64_add(-delta, ptr);
}
+EXPORT_SYMBOL(atomic64_sub);
/**
* atomic64_sub_and_test - subtract value from variable and test result
return old_val == 0;
}
+EXPORT_SYMBOL(atomic64_sub_and_test);
/**
* atomic64_inc - increment atomic64 variable
{
atomic64_add(1, ptr);
}
+EXPORT_SYMBOL(atomic64_inc);
/**
* atomic64_dec - decrement atomic64 variable
{
atomic64_sub(1, ptr);
}
+EXPORT_SYMBOL(atomic64_dec);
/**
* atomic64_dec_and_test - decrement and test
{
return atomic64_sub_and_test(1, ptr);
}
+EXPORT_SYMBOL(atomic64_dec_and_test);
/**
* atomic64_inc_and_test - increment and test
{
return atomic64_sub_and_test(-1, ptr);
}
+EXPORT_SYMBOL(atomic64_inc_and_test);
/**
* atomic64_add_negative - add and test if negative
return old_val < 0;
}
+EXPORT_SYMBOL(atomic64_add_negative);