The posix-shm Reference Manual

This is the posix-shm Reference Manual, version 0.0.7, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 19:13:15 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 posix-shm

POSIX shared memory API

Author

Samuel Hunter

Contact

Home Page

https://sr.ht/~shunter/posix-shm/

Source Control

(GIT https://git.sr.ht/~shunter/posix-shm)

Bug Tracker

https://todo.sr.ht/~shunter/posix-shm

License

BSD 3-Clause

Version

0.0.7

Dependencies
  • posix-shm/ffi (system).
  • alexandria (system).
  • trivial-features (system).
Source

posix-shm.asd.

Child Component

shm.lisp (file).


2.2 posix-shm/ffi

POSIX shared memory FFI

Author

Samuel Hunter

Contact

Home Page

https://sr.ht/~shunter/posix-shm/

Source Control

(GIT https://git.sr.ht/~shunter/posix-shm)

Bug Tracker

https://todo.sr.ht/~shunter/posix-shm

License

BSD 3-Clause

Version

0.0.7

Defsystem Dependency

cffi-grovel (system).

Dependency

cffi (system).

Source

posix-shm.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 posix-shm/posix-shm.asd

Source

posix-shm.asd.

Parent Component

posix-shm (system).

ASDF Systems

3.1.2 posix-shm/shm.lisp

Source

posix-shm.asd.

Parent Component

posix-shm (system).

Packages

xyz.shunter.posix-shm.

Public Interface
Internals

3.1.3 posix-shm/ffi/package.lisp

Source

posix-shm.asd.

Parent Component

posix-shm/ffi (system).

Packages

xyz.shunter.posix-shm.ffi.


3.1.4 posix-shm/ffi/grovel.lisp

Dependency

package.lisp (file).

Source

posix-shm.asd.

Parent Component

posix-shm/ffi (system).


3.1.5 posix-shm/ffi/ffi.lisp

Dependency

grovel.lisp (file).

Source

posix-shm.asd.

Parent Component

posix-shm/ffi (system).

Public Interface

3.1.6 posix-shm/ffi/wrapper.lisp

Dependency

ffi.lisp (file).

Source

posix-shm.asd.

Parent Component

posix-shm/ffi (system).


4 Packages

Packages are listed by definition order.


4.1 xyz.shunter.posix-shm

Source

shm.lisp.

Nickname

posix-shm

Use List

common-lisp.

Public Interface
Internals

4.2 xyz.shunter.posix-shm.ffi

Source

package.lisp.

Nickname

posix-shm/ffi

Public Interface

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: with-mmap ((var shm length &rest options) &body body)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Macro: with-open-shm ((var name &rest options) &body body)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Macro: with-open-shm* ((var &rest options) &body body)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Macro: with-open-shm-and-mmap ((shm mmap shm-options (length &rest mmap-options) &key truncate) &body body)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Macro: with-open-shm-and-mmap* ((shm mmap shm-options (length &rest mmap-options) &key truncate) &body body)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.


5.1.2 Ordinary functions

Function: chmod-shm (shm permissions)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: chown-shm (shm owner-id group-id)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: close (fd)
Package

xyz.shunter.posix-shm.ffi.

Source

ffi.lisp.

Function: close-shm (shm)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: delete-shm (name)

Deletes the shared memory object specified by NAME.

Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: fchmod (fd mode)
Package

xyz.shunter.posix-shm.ffi.

Source

ffi.lisp.

Function: fchown (fd owner group)
Package

xyz.shunter.posix-shm.ffi.

Source

ffi.lisp.

Function: ftruncate (fd length)
Package

xyz.shunter.posix-shm.ffi.

Source

ffi.lisp.

Function: make-shm (fd &optional name)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: mmap (addr length prot flags fd offset)
Package

xyz.shunter.posix-shm.ffi.

Source

ffi.lisp.

Function: mmap-shm (shm length &key ptr prot flags offset)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: munmap (ptr length)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: munmap (addr length)
Package

xyz.shunter.posix-shm.ffi.

Source

ffi.lisp.

Function: open-shm (name &key direction if-exists if-does-not-exist permissions)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: open-shm* (&key direction permissions attempts)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: open-shm-p (obj)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: shm-open (name oflag mode)
Package

xyz.shunter.posix-shm.ffi.

Source

ffi.lisp.

Function: shm-p (obj)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: shm-stats (shm)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Package

xyz.shunter.posix-shm.ffi.

Source

ffi.lisp.

Reader: stat-blksize (instance)
Writer: (setf stat-blksize) (instance)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Target Slot

blksize.

Reader: stat-blocks (instance)
Writer: (setf stat-blocks) (instance)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Target Slot

blocks.

Reader: stat-dev (instance)
Writer: (setf stat-dev) (instance)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Target Slot

dev.

Reader: stat-gid (instance)
Writer: (setf stat-gid) (instance)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Target Slot

gid.

Reader: stat-ino (instance)
Writer: (setf stat-ino) (instance)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Target Slot

ino.

Reader: stat-mode (instance)
Writer: (setf stat-mode) (instance)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Target Slot

mode.

Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Target Slot

nlink.

Reader: stat-rdev (instance)
Writer: (setf stat-rdev) (instance)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Target Slot

rdev.

Reader: stat-size (instance)
Writer: (setf stat-size) (instance)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Target Slot

size.

Reader: stat-uid (instance)
Writer: (setf stat-uid) (instance)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Target Slot

uid.

Function: strerror (errno)
Package

xyz.shunter.posix-shm.ffi.

Source

ffi.lisp.

Function: truncate-shm (shm size)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.


5.1.3 Generic functions

Generic Reader: shm-error-name (condition)
Package

xyz.shunter.posix-shm.

Methods
Reader Method: shm-error-name ((condition shm-error))
Source

shm.lisp.

Target Slot

%name.

Generic Reader: shm-fd (object)
Package

xyz.shunter.posix-shm.

Methods
Reader Method: shm-fd ((open-shm open-shm))

automatically generated reader method

Source

shm.lisp.

Target Slot

%fd.

Generic Reader: shm-name (object)
Package

xyz.shunter.posix-shm.

Methods
Reader Method: shm-name ((shm shm))

automatically generated reader method

Source

shm.lisp.

Target Slot

%name.


5.1.4 Standalone methods

Method: print-object ((shm shm) stream)
Source

shm.lisp.


5.1.5 Conditions

Condition: mmap-error
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct superclasses

error.

Direct subclasses

%simple-mmap-error.

Condition: shm-does-not-exist
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct superclasses

shm-error.

Condition: shm-error

A shm-error occurs during opening or closing a shared memory object,
or some low-level transaction between the OS and a preexisting shared memory object.

Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct superclasses

error.

Direct subclasses
Direct methods

shm-error-name.

Direct slots
Slot: %name
Initargs

:name

Readers

shm-error-name.

Writers

This slot is read-only.

Condition: shm-exists
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct superclasses

shm-error.


5.1.6 Structures

Structure: stat
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: dev
Type

fixnum

Initform

0

Readers

stat-dev.

Writers

(setf stat-dev).

Slot: ino
Type

fixnum

Initform

0

Readers

stat-ino.

Writers

(setf stat-ino).

Slot: mode
Type

list

Initform

0

Readers

stat-mode.

Writers

(setf stat-mode).

Type

fixnum

Initform

0

Readers

stat-nlink.

Writers

(setf stat-nlink).

Slot: uid
Type

fixnum

Initform

0

Readers

stat-uid.

Writers

(setf stat-uid).

Slot: gid
Type

fixnum

Initform

0

Readers

stat-gid.

Writers

(setf stat-gid).

Slot: rdev
Type

fixnum

Initform

0

Readers

stat-rdev.

Writers

(setf stat-rdev).

Slot: size
Type

fixnum

Initform

0

Readers

stat-size.

Writers

(setf stat-size).

Slot: blksize
Type

fixnum

Initform

0

Readers

stat-blksize.

Writers

(setf stat-blksize).

Slot: blocks
Type

fixnum

Initform

0

Readers

stat-blocks.

Writers

(setf stat-blocks).


5.1.7 Classes

Class: closed-shm
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct superclasses

shm.

Class: open-shm
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct superclasses

shm.

Direct methods

shm-fd.

Direct slots
Slot: %fd
Type

(integer 0)

Initargs

:fd

Readers

shm-fd.

Writers

This slot is read-only.

Class: shm
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: %name
Type

(or string null)

Initargs

:name

Readers

shm-name.

Writers

This slot is read-only.


5.2 Internals


5.2.1 Constants

Constant: +negative-one+

"Negative one", represented by a uid_t.

Package

xyz.shunter.posix-shm.

Source

shm.lisp.


5.2.2 Ordinary functions

Function: %default-dne-option (direction if-exists)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: %open-options-to-oflag (direction if-exists if-does-not-exist)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: %open-shm (name oflag mode if-exists if-does-not-exist)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: %open-shm* (oflag mode attempts)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: %raise-error (&key errno name)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: %raise-mmap-error (&key errno)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: %random-name ()
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: %read-new-value ()
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: copy-stat (instance)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: make-stat (&key dev ino mode nlink uid gid rdev size blksize blocks)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Function: stat-p (object)
Package

xyz.shunter.posix-shm.

Source

shm.lisp.


5.2.3 Conditions

Condition: %change-if-dne
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct superclasses

condition.

Direct slots
Slot: %value
Initargs

:value

Condition: %change-if-exists
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct superclasses

condition.

Direct slots
Slot: %value
Initargs

:value

Condition: %simple-mmap-error
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct superclasses

mmap-error.

Direct slots
Slot: %message
Initargs

:message

Condition: %simple-shm-error
Package

xyz.shunter.posix-shm.

Source

shm.lisp.

Direct superclasses

shm-error.

Direct slots
Slot: %message
Initargs

:message


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
C   D   F   G   M   O   P   S   T   W  
Index Entry  Section

%
%default-dne-option: Private ordinary functions
%open-options-to-oflag: Private ordinary functions
%open-shm: Private ordinary functions
%open-shm*: Private ordinary functions
%raise-error: Private ordinary functions
%raise-mmap-error: Private ordinary functions
%random-name: Private ordinary functions
%read-new-value: Private ordinary functions

(
(setf stat-blksize): Public ordinary functions
(setf stat-blocks): Public ordinary functions
(setf stat-dev): Public ordinary functions
(setf stat-gid): Public ordinary functions
(setf stat-ino): Public ordinary functions
(setf stat-mode): Public ordinary functions
(setf stat-nlink): Public ordinary functions
(setf stat-rdev): Public ordinary functions
(setf stat-size): Public ordinary functions
(setf stat-uid): Public ordinary functions

C
chmod-shm: Public ordinary functions
chown-shm: Public ordinary functions
close: Public ordinary functions
close-shm: Public ordinary functions
copy-stat: Private ordinary functions

D
delete-shm: Public ordinary functions

F
fchmod: Public ordinary functions
fchown: Public ordinary functions
ftruncate: Public ordinary functions
Function, %default-dne-option: Private ordinary functions
Function, %open-options-to-oflag: Private ordinary functions
Function, %open-shm: Private ordinary functions
Function, %open-shm*: Private ordinary functions
Function, %raise-error: Private ordinary functions
Function, %raise-mmap-error: Private ordinary functions
Function, %random-name: Private ordinary functions
Function, %read-new-value: Private ordinary functions
Function, (setf stat-blksize): Public ordinary functions
Function, (setf stat-blocks): Public ordinary functions
Function, (setf stat-dev): Public ordinary functions
Function, (setf stat-gid): Public ordinary functions
Function, (setf stat-ino): Public ordinary functions
Function, (setf stat-mode): Public ordinary functions
Function, (setf stat-nlink): Public ordinary functions
Function, (setf stat-rdev): Public ordinary functions
Function, (setf stat-size): Public ordinary functions
Function, (setf stat-uid): Public ordinary functions
Function, chmod-shm: Public ordinary functions
Function, chown-shm: Public ordinary functions
Function, close: Public ordinary functions
Function, close-shm: Public ordinary functions
Function, copy-stat: Private ordinary functions
Function, delete-shm: Public ordinary functions
Function, fchmod: Public ordinary functions
Function, fchown: Public ordinary functions
Function, ftruncate: Public ordinary functions
Function, make-shm: Public ordinary functions
Function, make-stat: Private ordinary functions
Function, mmap: Public ordinary functions
Function, mmap-shm: Public ordinary functions
Function, munmap: Public ordinary functions
Function, munmap: Public ordinary functions
Function, open-shm: Public ordinary functions
Function, open-shm*: Public ordinary functions
Function, open-shm-p: Public ordinary functions
Function, shm-open: Public ordinary functions
Function, shm-p: Public ordinary functions
Function, shm-stats: Public ordinary functions
Function, shm-unlink: Public ordinary functions
Function, stat-blksize: Public ordinary functions
Function, stat-blocks: Public ordinary functions
Function, stat-dev: Public ordinary functions
Function, stat-gid: Public ordinary functions
Function, stat-ino: Public ordinary functions
Function, stat-mode: Public ordinary functions
Function, stat-nlink: Public ordinary functions
Function, stat-p: Private ordinary functions
Function, stat-rdev: Public ordinary functions
Function, stat-size: Public ordinary functions
Function, stat-uid: Public ordinary functions
Function, strerror: Public ordinary functions
Function, truncate-shm: Public ordinary functions

G
Generic Function, shm-error-name: Public generic functions
Generic Function, shm-fd: Public generic functions
Generic Function, shm-name: Public generic functions

M
Macro, with-mmap: Public macros
Macro, with-open-shm: Public macros
Macro, with-open-shm*: Public macros
Macro, with-open-shm-and-mmap: Public macros
Macro, with-open-shm-and-mmap*: Public macros
make-shm: Public ordinary functions
make-stat: Private ordinary functions
Method, print-object: Public standalone methods
Method, shm-error-name: Public generic functions
Method, shm-fd: Public generic functions
Method, shm-name: Public generic functions
mmap: Public ordinary functions
mmap-shm: Public ordinary functions
munmap: Public ordinary functions
munmap: Public ordinary functions

O
open-shm: Public ordinary functions
open-shm*: Public ordinary functions
open-shm-p: Public ordinary functions

P
print-object: Public standalone methods

S
shm-error-name: Public generic functions
shm-error-name: Public generic functions
shm-fd: Public generic functions
shm-fd: Public generic functions
shm-name: Public generic functions
shm-name: Public generic functions
shm-open: Public ordinary functions
shm-p: Public ordinary functions
shm-stats: Public ordinary functions
shm-unlink: Public ordinary functions
stat-blksize: Public ordinary functions
stat-blocks: Public ordinary functions
stat-dev: Public ordinary functions
stat-gid: Public ordinary functions
stat-ino: Public ordinary functions
stat-mode: Public ordinary functions
stat-nlink: Public ordinary functions
stat-p: Private ordinary functions
stat-rdev: Public ordinary functions
stat-size: Public ordinary functions
stat-uid: Public ordinary functions
strerror: Public ordinary functions

T
truncate-shm: Public ordinary functions

W
with-mmap: Public macros
with-open-shm: Public macros
with-open-shm*: Public macros
with-open-shm-and-mmap: Public macros
with-open-shm-and-mmap*: Public macros


A.4 Data types

Jump to:   %  
C   F   G   M   O   P   S   W   X  
Index Entry  Section

%
%change-if-dne: Private conditions
%change-if-exists: Private conditions
%simple-mmap-error: Private conditions
%simple-shm-error: Private conditions

C
Class, closed-shm: Public classes
Class, open-shm: Public classes
Class, shm: Public classes
closed-shm: Public classes
Condition, %change-if-dne: Private conditions
Condition, %change-if-exists: Private conditions
Condition, %simple-mmap-error: Private conditions
Condition, %simple-shm-error: Private conditions
Condition, mmap-error: Public conditions
Condition, shm-does-not-exist: Public conditions
Condition, shm-error: Public conditions
Condition, shm-exists: Public conditions

F
ffi.lisp: The posix-shm/ffi/ffi․lisp file
File, ffi.lisp: The posix-shm/ffi/ffi․lisp file
File, grovel.lisp: The posix-shm/ffi/grovel․lisp file
File, package.lisp: The posix-shm/ffi/package․lisp file
File, posix-shm.asd: The posix-shm/posix-shm․asd file
File, shm.lisp: The posix-shm/shm․lisp file
File, wrapper.lisp: The posix-shm/ffi/wrapper․lisp file

G
grovel.lisp: The posix-shm/ffi/grovel․lisp file

M
mmap-error: Public conditions

O
open-shm: Public classes

P
Package, xyz.shunter.posix-shm: The xyz․shunter․posix-shm package
Package, xyz.shunter.posix-shm.ffi: The xyz․shunter․posix-shm․ffi package
package.lisp: The posix-shm/ffi/package․lisp file
posix-shm: The posix-shm system
posix-shm.asd: The posix-shm/posix-shm․asd file
posix-shm/ffi: The posix-shm/ffi system

S
shm: Public classes
shm-does-not-exist: Public conditions
shm-error: Public conditions
shm-exists: Public conditions
shm.lisp: The posix-shm/shm․lisp file
stat: Public structures
Structure, stat: Public structures
System, posix-shm: The posix-shm system
System, posix-shm/ffi: The posix-shm/ffi system

W
wrapper.lisp: The posix-shm/ffi/wrapper․lisp file

X
xyz.shunter.posix-shm: The xyz․shunter․posix-shm package
xyz.shunter.posix-shm.ffi: The xyz․shunter․posix-shm․ffi package