haiku/src/system/kernel/Jamfile

162 lines
3.6 KiB
Plaintext
Raw Normal View History

SubDir HAIKU_TOP src system kernel ;
{
local defines =
HAIKU_ARCH=\\\"$(TARGET_ARCH)\\\"
;
defines = [ FDefines $(defines) ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;
}
UsePrivateHeaders shared ;
UsePrivateHeaders runtime_loader ;
AddResources kernel_$(TARGET_ARCH) : kernel.rdef ;
KernelMergeObject kernel_core.o :
boot_item.cpp
boot_splash.cpp
Merged branch haiku/branches/developer/bonefish/optimization revision 23139 into trunk, with roughly the following changes (for details svn log the branch): * The int 99 syscall handler is now fully in assembly. * Added a sysenter/sysexit handler and use it on Pentiums that support it (via commpage). * Got rid of i386_handle_trap(). A bit of functionality was moved into the assembly handler which now uses a jump table to call C functions handling the respective interrupt. * Some optimizations to get user debugger support code out of the interrupt handling path. * Introduced a thread::flags fields which allows to skip handling of rare events (signals, user debug enabling/disabling) on the common interrupt handling path. * Got rid of the explicit iframe stack. The iframes can still be retrieved by iterating through the stack frames. * Made the commpage an architecture independent feature. It's used for the real time data stuff (instead of creating a separate area). * The x86 CPU modules can now provide processor optimized versions for common functions (currently memcpy() only). They are used in the kernel and are provided to the userland via commpage entries. * Introduced build system feature allowing easy use of C structure member offsets in assembly code. Changes after merging: * Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp (caused by refactoring and introduction of "call" debugger command). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 03:36:44 +03:00
commpage.cpp
condition_variable.cpp
cpu.c
elf.cpp
Complete rework of the heap implementation. Freelists are now part of the pages and pages are now kept in lists as well. This allows to return free pages once a bin does not need them anymore. Partially filled pages are kept in a sorted linked list so that allocation will always happen on the fullest page - this favours having full pages and makes it more likely lightly used pages will get completely empty so they can be returned. Generally this now goes more in the direction of a slab allocator. The allocation logic has been extracted, so a heap is now simply attachable to a region of memory. This allows for multiple heaps and for dynamic growing. In case the allocator runs out of free pages, an asynchronous growing thread is notified to create a new area and attach a new heap to it. By default the kernel heap is now set to 16MB and grows by 8MB each time all heaps run full. This should solve quite a few issues, like certain bins just claiming all pages so that even if there is free space nothing can be allocated. Also it obviously does aways with filling the heap page by page until it overgrows. I think this is now a well performing and scalable allocator we can live with for quite some time. It is well tested under emulation and real hardware and performs as expected. If problems come up there is an extensive sanity checker that can be enabled by PARANOID_VALIDATION that covers most aspects of the allocator. For normal operation this is not necessary though and is therefore disabled by default. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-11 00:00:13 +03:00
heap.cpp
image.c
int.c
kernel_daemon.c
linkhack.c
lock.c
main.c
module.cpp
Notifications.cpp
port.cpp
real_time_clock.c
scheduler.cpp
sem.cpp
shutdown.c
signal.cpp
system_info.cpp
smp.c
syscalls.cpp
team.cpp
thread.cpp
timer.c
usergroup.cpp
wait_for_objects.cpp
: $(TARGET_KERNEL_PIC_CCFLAGS)
;
# We need to specify the dependency on the generated syscalls files explicitly.
Includes [ FGristFiles syscalls.cpp ]
: <syscalls>syscall_dispatcher.h <syscalls>syscall_table.h
<syscalls>syscall_numbers.h
;
KernelLd linkhack.so :
<$(SOURCE_GRIST)>linkhack.o
:
:
-shared -Bdynamic
;
KernelLd kernel_$(TARGET_ARCH) :
kernel_core.o
kernel_fs.o
kernel_vm.o
kernel_cache.o
kernel_device_manager.o
kernel_disk_device_manager.o
kernel_util.o
kernel_messaging.o
kernel_debug.o
kernel_slab.o
lib$(TARGET_ARCH).a
kernel_platform_$(TARGET_BOOT_PLATFORM).o
linkhack.so
# kernel parts borrowed from libroot and others
kernel_os_main.o
kernel_os_arch_$(TARGET_ARCH).o
kernel_posix.o
kernel_posix_arch_$(TARGET_ARCH).o
kernel_misc.o
$(HAIKU_STATIC_LIBSUPC++)
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/kernel.ld
: -Bdynamic -export-dynamic -dynamic-linker /foo/bar
$(TARGET_KERNEL_PIC_LINKFLAGS)
:
;
KernelLd kernel.so :
kernel_core.o
kernel_fs.o
kernel_vm.o
kernel_cache.o
kernel_device_manager.o
kernel_disk_device_manager.o
kernel_util.o
kernel_messaging.o
kernel_debug.o
kernel_slab.o
lib$(TARGET_ARCH).a
kernel_platform_$(TARGET_BOOT_PLATFORM).o
linkhack.so
# kernel libroot parts
kernel_os_main.o
kernel_os_arch_$(TARGET_ARCH).o
kernel_posix.o
kernel_posix_arch_$(TARGET_ARCH).o
$(HAIKU_STATIC_LIBSUPC++)
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/kernel.ld
: -Bdynamic -shared -export-dynamic -dynamic-linker /foo/bar
$(TARGET_KERNEL_PIC_LINKFLAGS)
;
NotFile kernel ;
Depends kernel : kernel_$(TARGET_ARCH) ;
Depends kernel.so : kernel ;
# kernel.so will be rebuilt with the kernel
# propagate HAIKU_INCLUDE_IN_IMAGE variable from kernel to kernel_$(TARGET_ARCH)
HAIKU_INCLUDE_IN_IMAGE on kernel_$(TARGET_ARCH)
= [ on kernel return $(HAIKU_INCLUDE_IN_IMAGE) ] ;
# Copy kernel and update the copy's revision section. We link everything
# against the original, but the copy will end up on the disk image (this way
# we avoid unnecessary dependencies). The copy will be located in a subdirectory.
if $(TARGET_PLATFORM) = haiku {
MakeLocate <revisioned>kernel_$(TARGET_ARCH)
: [ FDirName $(TARGET_DEBUG_$(DEBUG)_LOCATE_TARGET) revisioned ] ;
CopySetHaikuRevision <revisioned>kernel_$(TARGET_ARCH)
: kernel_$(TARGET_ARCH) ;
}
SubInclude HAIKU_TOP src system kernel arch ;
SubInclude HAIKU_TOP src system kernel cache ;
SubInclude HAIKU_TOP src system kernel device_manager ;
SubInclude HAIKU_TOP src system kernel debug ;
SubInclude HAIKU_TOP src system kernel disk_device_manager ;
SubInclude HAIKU_TOP src system kernel fs ;
SubInclude HAIKU_TOP src system kernel lib ;
SubInclude HAIKU_TOP src system kernel messaging ;
SubInclude HAIKU_TOP src system kernel slab ;
SubInclude HAIKU_TOP src system kernel util ;
SubInclude HAIKU_TOP src system kernel vm ;
if $(TARGET_BOOT_PLATFORM) {
SubInclude HAIKU_TOP src system kernel platform $(TARGET_BOOT_PLATFORM) ;
}