pgrx_pg_sys/
cshim.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![cfg(feature = "cshim")]
#![allow(deprecated)]

use crate as pg_sys;

#[pgrx_macros::pg_guard]
extern "C" {
    #[link_name = "SpinLockInit__pgrx_cshim"]
    pub fn SpinLockInit(lock: *mut pg_sys::slock_t);
    #[link_name = "SpinLockAcquire__pgrx_cshim"]
    pub fn SpinLockAcquire(lock: *mut pg_sys::slock_t);
    #[link_name = "SpinLockRelease__pgrx_cshim"]
    pub fn SpinLockRelease(lock: *mut pg_sys::slock_t);
    #[link_name = "SpinLockFree__pgrx_cshim"]
    pub fn SpinLockFree(lock: *mut pg_sys::slock_t) -> bool;
}