Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1575 → Rev 1576

/kernel/trunk/generic/include/proc/thread.h
37,6 → 37,7
#include <typedefs.h>
#include <time/timeout.h>
#include <synch/rwlock.h>
#include <synch/synch.h>
#include <config.h>
#include <adt/btree.h>
#include <adt/list.h>
154,6 → 155,7
extern void thread_sleep(__u32 sec);
extern void thread_usleep(__u32 usec);
 
#define thread_join(t) thread_join_timeout((t), SYNCH_NO_TIMEOUT, SYNCH_FLAGS_NONE)
extern int thread_join_timeout(thread_t *t, __u32 usec, int flags);
extern void thread_detach(thread_t *t);
 
/kernel/trunk/generic/include/mm/slab.h
78,7 → 78,7
 
link_t link;
/* Configuration */
size_t size; /**< Size of SLAB position - align_up(sizeof(obj)) */
size_t size; /**< Size of slab position - align_up(sizeof(obj)) */
int (*constructor)(void *obj, int kmflag);
int (*destructor)(void *obj);
int flags; /**< Flags changing behaviour of cache */
91,7 → 91,7
atomic_t allocated_slabs;
atomic_t allocated_objs;
atomic_t cached_objs;
atomic_t magazine_counter; /*<< How many magazines in magazines list */
atomic_t magazine_counter; /**< How many magazines in magazines list */
 
/* Slabs */
link_t full_slabs; /**< List of full slabs */
117,14 → 117,14
extern void slab_free(slab_cache_t *cache, void *obj);
extern count_t slab_reclaim(int flags);
 
/** Initialize SLAB subsytem */
/** Initialize slab subsytem */
extern void slab_cache_init(void);
extern void slab_enable_cpucache(void);
 
/* KConsole debug */
/* kconsole debug */
extern void slab_print_list(void);
 
/* Malloc support */
/* malloc support */
extern void * malloc(unsigned int size, int flags);
extern void free(void *obj);
#endif
/kernel/trunk/generic/src/main/kinit.c
82,6 → 82,11
thread_t *t;
task_t *utask;
 
/*
* Detach kinit as nobody will call thread_join_timeout() on it.
*/
thread_detach(THREAD);
 
interrupts_disable();
 
#ifdef CONFIG_SMP
98,9 → 103,11
t->cpu = &cpus[0];
spinlock_unlock(&t->lock);
thread_ready(t);
waitq_sleep(&kmp_completion_wq);
}
else panic("thread_create/kmp\n");
else {
panic("thread_create/kmp\n");
}
thread_join(t);
}
#endif /* CONFIG_SMP */
/*
/kernel/trunk/generic/src/proc/scheduler.c
516,6 → 516,11
int count, average, i, j, k = 0;
ipl_t ipl;
 
/*
* Detach kcpulb as nobody will call thread_join_timeout() on it.
*/
thread_detach(THREAD);
loop:
/*
* Work in 1s intervals.
/kernel/trunk/arch/ia32/include/smp/mps.h
116,7 → 116,6
 
 
extern waitq_t ap_completion_wq;
extern waitq_t kmp_completion_wq;
 
extern struct smp_config_operations mps_config_operations;
 
/kernel/trunk/arch/ia32/src/smp/mps.c
79,9 → 79,7
int l_intr_entry_cnt = 0;
 
waitq_t ap_completion_wq;
waitq_t kmp_completion_wq;
 
 
/*
* Implementation of IA-32 SMP configuration interface.
*/
/kernel/trunk/arch/ia32/src/smp/smp.c
84,13 → 84,6
l_apic = (__u32 *) l_apic_address;
io_apic = (__u32 *) io_apic_address;
}
 
/*
* Must be initialized outside the kmp thread, since it is waited
* on before the kmp thread is created.
*/
waitq_initialize(&kmp_completion_wq);
 
}
 
/*
172,12 → 165,6
} else
printf("INIT IPI for l_apic%d failed\n", ops->cpu_apic_id(i));
}
 
/*
* Wakeup the kinit thread so that
* system initialization can go on.
*/
waitq_wakeup(&kmp_completion_wq, WAKEUP_FIRST);
}
 
int smp_irq_to_pin(int irq)