Export `pgx_SpinLock.*` as `SpinLock.*`
@@ -250,10 +250,6 @@ mod all_versions {
pub fn pgx_list_nth_oid(list: *mut super::List, nth: i32) -> super::Oid;
pub fn pgx_list_nth_cell(list: *mut super::List, nth: i32) -> *mut super::ListCell;
pub fn pgx_GETSTRUCT(tuple: pg_sys::HeapTuple) -> *mut std::os::raw::c_char;
- pub fn pgx_SpinLockInit(lock: *mut pg_sys::slock_t);
- pub fn pgx_SpinLockAcquire(lock: *mut pg_sys::slock_t);
- pub fn pgx_SpinLockRelease(lock: *mut pg_sys::slock_t);
- pub fn pgx_SpinLockFree(lock: *mut pg_sys::slock_t) -> bool;
}
#[inline]
@@ -459,6 +455,19 @@ mod all_versions {
context: *mut ::std::os::raw::c_void,
) -> bool;
}
+
+ #[pgx_macros::pg_guard]
+ extern "C" {
+ fn pgx_SpinLockInit(lock: *mut pg_sys::slock_t);
+ fn pgx_SpinLockAcquire(lock: *mut pg_sys::slock_t);
+ fn pgx_SpinLockRelease(lock: *mut pg_sys::slock_t);
+ fn pgx_SpinLockFree(lock: *mut pg_sys::slock_t) -> bool;
+ }
+
+ pub use {
+ pgx_SpinLockAcquire as SpinLockAcquire, pgx_SpinLockFree as SpinLockFree,
+ pgx_SpinLockInit as SpinLockInit, pgx_SpinLockRelease as SpinLockRelease,
+ };
}
mod internal {
