1module shmem 2 ! external routines wrapping the Qt QSharedMemory class 3 interface 4 function shmem_create (size) bind(C, name="shmem_create") 5 use iso_c_binding, only: c_bool, c_int 6 logical(c_bool) :: shmem_create 7 integer(c_int), value, intent(in) :: size 8 end function shmem_create 9 10 subroutine shmem_setkey (key) bind(C, name="shmem_setkey") 11 use iso_c_binding, only: c_bool, c_char 12 character(kind=c_char), intent(in) :: key(*) 13 end subroutine shmem_setkey 14 15 function shmem_attach () bind(C, name="shmem_attach") 16 use iso_c_binding, only: c_bool 17 logical(c_bool) :: shmem_attach 18 end function shmem_attach 19 20 function shmem_address() bind(C, name="shmem_address") 21 use, intrinsic :: iso_c_binding, only: c_ptr 22 type(c_ptr) :: shmem_address 23 end function shmem_address 24 25 function shmem_size() bind(C, name="shmem_size") 26 use, intrinsic :: iso_c_binding, only: c_int 27 integer(c_int) :: shmem_size 28 end function shmem_size 29 30 function shmem_lock () bind(C, name="shmem_lock") 31 use iso_c_binding, only: c_bool 32 logical(c_bool) :: shmem_lock 33 end function shmem_lock 34 35 function shmem_unlock () bind(C, name="shmem_unlock") 36 use iso_c_binding, only: c_bool 37 logical(c_bool) :: shmem_unlock 38 end function shmem_unlock 39 40 function shmem_detach () bind(C, name="shmem_detach") 41 use iso_c_binding, only: c_bool 42 logical(c_bool) :: shmem_detach 43 end function shmem_detach 44 end interface 45end module shmem 46