+ /* If we need it, get the thread list */
+ if (type == PSET_THING_THREAD) {
+ for (thread = (thread_t)queue_first(&threads);
+ !queue_end(&threads, (queue_entry_t)thread);
+ thread = (thread_t)queue_next(&thread->threads)) {
+#if defined(SECURE_KERNEL)
+ if (thread->task != kernel_task) {
+#endif
+ thread_reference_internal(thread);
+ thread_list[actual_threads++] = thread;
+#if defined(SECURE_KERNEL)
+ }
+#endif
+ }
+ }
+#if !CONFIG_MACF
+ else {
+#endif
+ /* get a list of the tasks */