;;;;
;;;;
;;;; 18.stk         -- Implementation of the (srfi 18) library
;;;;
;;;; Copyright © 2021-2023 Erick Gallesio <eg@stklos.net>
;;;;
;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation; either version 2 of the License, or
;;;; (at your option) any later version.
;;;;
;;;; This program is distributed in the hope that it will be useful,
;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;;; GNU General Public License for more details.
;;;;
;;;; You should have received a copy of the GNU General Public License
;;;; along with this program; if not, write to the Free Software
;;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
;;;; USA.
;;;;
;;;;           Author: Erick Gallesio [eg@unice.fr]
;;;;    Creation date: 10-Oct-2021 19:38
;;;;


(define-module srfi/18)

(unless (eq? (%thread-system) 'none)
  (select-module srfi/18)
  (import (only SCHEME
                current-thread thread? make-thread
                thread-name thread-specific thread-specific-set!
                thread-start! thread-yield! thread-sleep!
                thread-terminate! thread-join!
                mutex? make-mutex mutex-name
                mutex-specific mutex-specific-set!
                mutex-state mutex-lock! mutex-unlock!
                condition-variable? make-condition-variable
                condition-variable-name condition-variable-specific
                condition-variable-specific-set!
                condition-variable-signal!
                condition-variable-broadcast!
                current-time time? time->seconds
                seconds->time current-exception-handler
                with-exception-handler
                raise
                join-timeout-exception?
                abandoned-mutex-exception?
                terminated-thread-exception?
                uncaught-exception?
                uncaught-exception-reason))
  (export current-thread thread? make-thread
          thread-name thread-specific thread-specific-set!
          thread-start! thread-yield! thread-sleep!
          thread-terminate! thread-join!
          mutex? make-mutex mutex-name
          mutex-specific mutex-specific-set!
          mutex-state mutex-lock! mutex-unlock!
          condition-variable? make-condition-variable
          condition-variable-name condition-variable-specific
          condition-variable-specific-set!
          condition-variable-signal!
          condition-variable-broadcast!
          current-time time? time->seconds
          seconds->time current-exception-handler
          with-exception-handler
          raise
          join-timeout-exception?
          abandoned-mutex-exception?
          terminated-thread-exception?
          uncaught-exception?
          uncaught-exception-reason)


)



(provide "srfi/18")
