mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-23 20:05:32 +02:00
Move {total,current}-processor-count' outside of
posix.c'.
* libguile/posix.c (scm_total_processor_count, scm_current_processor_count): Move to... * libguile/threads.c: ... here. * libguile/posix.h (scm_total_processor_count, scm_current_processor_count): Move declarations to... * libguile/threads.h: ... here. * test-suite/tests/posix.test ("nproc"): Move tests to... * test-suite/tests/threads.test: ... here.
This commit is contained in:
parent
bbec460245
commit
d20912e67d
6 changed files with 53 additions and 47 deletions
|
@ -198,16 +198,3 @@
|
|||
(setaffinity (getpid) mask)
|
||||
(equal? mask (getaffinity (getpid))))
|
||||
(throw 'unresolved))))
|
||||
|
||||
;;
|
||||
;; nproc
|
||||
;;
|
||||
|
||||
(with-test-prefix "nproc"
|
||||
|
||||
(pass-if "total-processor-count"
|
||||
(>= (total-processor-count) 1))
|
||||
|
||||
(pass-if "current-processor-count"
|
||||
(and (>= (current-processor-count) 1)
|
||||
(>= (total-processor-count) (current-processor-count)))))
|
||||
|
|
|
@ -463,3 +463,17 @@
|
|||
(lambda () (lock-mutex m))
|
||||
(lambda key (set! success #t)))
|
||||
success)))))
|
||||
|
||||
|
||||
;;
|
||||
;; nproc
|
||||
;;
|
||||
|
||||
(with-test-prefix "nproc"
|
||||
|
||||
(pass-if "total-processor-count"
|
||||
(>= (total-processor-count) 1))
|
||||
|
||||
(pass-if "current-processor-count"
|
||||
(and (>= (current-processor-count) 1)
|
||||
(>= (total-processor-count) (current-processor-count)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue