changelog shortlog graph tags branches changeset files file revisions raw help

Mercurial > core / annotate lisp/lib/io/ring.lisp

changeset 695: 2bad47888dbf
parent: c40d2a41d7ce
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 04 Oct 2024 16:14:44 -0400
permissions: -rw-r--r--
description: add static-vector
431
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
1
 ;;; io/ring.lisp --- IO Ring Library
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
2
 
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
3
 ;; 
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
4
 
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
5
 ;;; Code:
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
6
 (in-package :io/ring)
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
7
 
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
8
 (load-uring)
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
9
 
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
10
 (defvar *io* nil)
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
11
 
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
12
 (defun init-io (&optional (entries 256) (flags 0))
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
13
   "Initialize the *IO* variable to an io-uring alien-value type using a
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
14
 queue size of ENTRIES and settings FLAGS."
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
15
   (with-new-io-uring r
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
16
     (if (= 0 (io-uring-queue-init entries (addr r) flags))
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
17
         (setf *io* r)
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
18
         (error "failed to initialize io-uring"))))
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
19
 
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
20
 ;; (defun enter-io (ring))
c40d2a41d7ce source concatenating std.lisp, more systems, got zstd simple working, IO work, added dat/tar
Richard Westhaver <ellis@rwest.io>
parents:
diff changeset
21
 ;; (defun exit-io (ring))