Created
September 10, 2018 06:42
-
-
Save leosongwei/30158cbc1a90a8f8ed8c3d276aff9c77 to your computer and use it in GitHub Desktop.
examples.lisp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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