diff options
| author | Christoph Berg <myon@debian.org> | 2020-05-11 22:17:58 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2020-05-11 22:17:58 +0200 |
| commit | 32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (patch) | |
| tree | c6e107c1ee4d70610e43a7912e57c720334a08c7 /lib/shmem.f90 | |
| parent | 08299e8b2bf50ba90daf570f57def529dd29d6e7 (diff) | |
New upstream version 2.2.0~rc1+repackupstream/2.2.0_rc1+repack
Diffstat (limited to 'lib/shmem.f90')
| -rw-r--r-- | lib/shmem.f90 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/shmem.f90 b/lib/shmem.f90 new file mode 100644 index 00000000..8d9db7d6 --- /dev/null +++ b/lib/shmem.f90 @@ -0,0 +1,45 @@ +module shmem + ! external routines wrapping the Qt QSharedMemory class + interface + function shmem_create (size) bind(C, name="shmem_create") + use iso_c_binding, only: c_bool, c_int + logical(c_bool) :: shmem_create + integer(c_int), value, intent(in) :: size + end function shmem_create + + subroutine shmem_setkey (key) bind(C, name="shmem_setkey") + use iso_c_binding, only: c_bool, c_char + character(kind=c_char), intent(in) :: key(*) + end subroutine shmem_setkey + + function shmem_attach () bind(C, name="shmem_attach") + use iso_c_binding, only: c_bool + logical(c_bool) :: shmem_attach + end function shmem_attach + + function shmem_address() bind(C, name="shmem_address") + use, intrinsic :: iso_c_binding, only: c_ptr + type(c_ptr) :: shmem_address + end function shmem_address + + function shmem_size() bind(C, name="shmem_size") + use, intrinsic :: iso_c_binding, only: c_int + integer(c_int) :: shmem_size + end function shmem_size + + function shmem_lock () bind(C, name="shmem_lock") + use iso_c_binding, only: c_bool + logical(c_bool) :: shmem_lock + end function shmem_lock + + function shmem_unlock () bind(C, name="shmem_unlock") + use iso_c_binding, only: c_bool + logical(c_bool) :: shmem_unlock + end function shmem_unlock + + function shmem_detach () bind(C, name="shmem_detach") + use iso_c_binding, only: c_bool + logical(c_bool) :: shmem_detach + end function shmem_detach + end interface +end module shmem |
