National Institute of Advanced Industrial Science and Technology (AIST) This page is a page of the former research institute. We stopped updating on March 31.2001.
E-mail to webmaster (Japanese) E-mail to webmaster (English)
next up previous contents index
Next: Low-Level Memory Management Up: Unix System Calls Previous: Signals

Multithread

There is no way to create bound threads. Therefore only one signal stack and one interval timer are available in a EusLisp process. On Solaris2, the main top-level runs in a separated thread.

  unix:thr-self [function]

  unix:thr-getprio id [function]   unix:thr-setprio id newprio [function]   unix:thr-getconcurrency [function]
  • returns the concurrency value (integer) which represents the number of threads that can run concurrently.
  unix:thr-setconcurrency concurrency [function]
  • The concurrency value is the number of LWP in the process. If the concurrency is 1, which is the default, many threads you created are assigned to one LWP in turn even though all of them are runnable. If the program is running on a multi-processor machine and you want to utilize more than one CPU at the same time, you should set a value bigger than one to concurrency. Note that a big concurrency value let the operating system consume more resource. Usually concurrency should be smaller than or equal to the number of processors.
  unix:thr-create func arg-list &optional (size 64*1024) [function]
  • creates a new thread with size words of Lisp stack and size bytes of C stack, and let it apply func to arg-list. The thread cannot return any results to the caller. Use of this function is discouraged.

next up previous contents index
Next: Low-Level Memory Management Up: Unix System Calls Previous: Signals

Hirofumi Nakagaki
Fri Mar 22 12:46:38 JST 1996