Skip to content

Commit

Permalink
examples
Browse files Browse the repository at this point in the history
  • Loading branch information
leosongwei committed Sep 9, 2018
1 parent 229aecd commit 70d2bb4
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions doc/examples.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
(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)

0 comments on commit 70d2bb4

Please sign in to comment.