Skip to content

Instantly share code, notes, and snippets.

@leosongwei
Created September 10, 2018 06:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leosongwei/30158cbc1a90a8f8ed8c3d276aff9c77 to your computer and use it in GitHub Desktop.
Save leosongwei/30158cbc1a90a8f8ed8c3d276aff9c77 to your computer and use it in GitHub Desktop.
examples.lisp
(in-package :cl-user)
;;;; -------------------------------------------------
;;;; Thread management
;; List all threads
(mezzano.supervisor::all-threads)
;; Set thread priority
(mapcar (lambda (thread)
(if (string= "Compositor"
(mezzano.supervisor::thread-name thread))
(setf (mezzano.supervisor::thread-priority thread)
:high)))
(mezzano.supervisor::all-threads))
;;;; -------------------------------------------------
;;;; Files
;; Copy file
;; (sys.int::copy-file orig new '(unsigned-byte 8))
(sys.int::copy-file "REMOTE:/home/leo/Lain.jpg"
"LOCAL:>Lain.jpg"
'(unsigned-byte 8))
;;;; -------------------------------------------------
;;;; Desktop
;; Set background image
(let ((image "LOCAL:>Lain.jpg"))
(mezzano.supervisor:fifo-push
(make-instance 'mezzano.gui.desktop::set-background-image :image-pathname image)
sys.int::*desktop*))
;;;; -------------------------------------------------
;;;; SMP
;; Detect and boot secondary cpus
(mezzano.supervisor::boot-secondary-cpus)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment