-
-/**
- * tipc_ref_lock - lock referenced object and return pointer to it
- */
-
-static inline void *tipc_ref_lock(u32 ref)
-{
- if (likely(tipc_ref_table.entries)) {
- struct reference *r =
- &tipc_ref_table.entries[ref & tipc_ref_table.index_mask];
-
- spin_lock_bh(&r->lock);
- if (likely(r->data.reference == ref))
- return r->object;
- spin_unlock_bh(&r->lock);
- }
- return 0;
-}
-
-/**
- * tipc_ref_unlock - unlock referenced object
- */
-
-static inline void tipc_ref_unlock(u32 ref)
-{
- if (likely(tipc_ref_table.entries)) {
- struct reference *r =
- &tipc_ref_table.entries[ref & tipc_ref_table.index_mask];
-
- if (likely(r->data.reference == ref))
- spin_unlock_bh(&r->lock);
- else
- err("tipc_ref_unlock() invoked using obsolete reference\n");
- }
-}
-
-/**
- * tipc_ref_deref - return pointer referenced object (without locking it)
- */
-
-static inline void *tipc_ref_deref(u32 ref)
-{
- if (likely(tipc_ref_table.entries)) {
- struct reference *r =
- &tipc_ref_table.entries[ref & tipc_ref_table.index_mask];
-
- if (likely(r->data.reference == ref))
- return r->object;
- }
- return 0;
-}
+void *tipc_ref_lock(u32 ref);
+void tipc_ref_unlock(u32 ref);
+void *tipc_ref_deref(u32 ref);