haiku/src/system/kernel/Jamfile
Ingo Weinhold 813d4cbe94 * Moved created subdirectory src/system/kernel/lock.cpp to new subdirectory
locks.
* Added syscalls for a new kind of mutex. A mutex consists only of an int32 and
  doesn't require any kernel resources. So it's initialization cannot fail
  (it consists only of setting the mutex value to 0). An uncontended lock or
  unlock operation can basically consist of an atomic_*() in userland. The
  syscalls (when the mutex is contended) are a bit more expensive than semaphore
  operations, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 16:07:39 +00:00

201 lines
4.8 KiB
Plaintext

SubDir HAIKU_TOP src system kernel ;
{
local defines =
HAIKU_ARCH=\\\"$(TARGET_ARCH)\\\"
;
defines = [ FDefines $(defines) ] ;
SubDirCcFlags $(defines) ;
SubDirC++Flags $(defines) ;
}
SEARCH_SOURCE += [ FDirName $(SUBDIR) locks ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) scheduler ] ;
UsePrivateHeaders libroot ;
UsePrivateHeaders shared ;
UsePrivateHeaders runtime_loader ;
AddResources kernel_$(TARGET_ARCH) : kernel.rdef ;
SetVersionScript kernel_$(TARGET_ARCH) : kernel_versions ;
SetVersionScript kernel.so : kernel_versions ;
KernelMergeObject kernel_core.o :
boot_item.cpp
boot_splash.cpp
commpage.cpp
condition_variable.cpp
cpu.cpp
elf.cpp
heap.cpp
image.cpp
int.cpp
kernel_daemon.cpp
linkhack.c
listeners.cpp
low_resource_manager.cpp
main.cpp
module.cpp
Notifications.cpp
port.cpp
real_time_clock.cpp
sem.cpp
shutdown.cpp
signal.cpp
system_info.cpp
smp.cpp
syscalls.cpp
team.cpp
thread.cpp
timer.cpp
usergroup.cpp
wait_for_objects.cpp
# locks
lock.cpp
user_mutex.cpp
# scheduler
scheduler.cpp
scheduler_affine.cpp
scheduler_simple.cpp
scheduler_simple_smp.cpp
scheduler_tracing.cpp
scheduling_analysis.cpp
: $(TARGET_KERNEL_PIC_CCFLAGS)
;
# Generate the header defining macros for C++ structure sizes.
local kernelC++StructSizesHeader = [ FGristFiles kernel_c++_struct_sizes.h ] ;
TARGET_HDRS on $(kernelC++StructSizesHeader)
= [ on $(kernelC++StructSizesHeader) return $(TARGET_HDRS) ]
$(TARGET_PRIVATE_KERNEL_HEADERS) ;
CreateAsmStructOffsetsHeader $(kernelC++StructSizesHeader)
: kernel_c++_structs.cpp ;
# 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
;
# TODO: fix or update binutils for ppc, in the meantime this should get things going.
local linkHackLdFlags ;
if $(TARGET_ARCH) = ppc {
linkHackLdFlags = -Bdynamic ;
} else {
linkHackLdFlags = -shared -Bdynamic ;
}
KernelLd linkhack.so :
<$(SOURCE_GRIST)>linkhack.o
:
:
$(linkHackLdFlags)
;
KernelLd kernel_$(TARGET_ARCH) :
kernel_cache.o
kernel_core.o
kernel_debug.o
kernel_device_manager.o
kernel_disk_device_manager.o
kernel_fs.o
kernel_messaging.o
kernel_posix.o
kernel_slab.o
kernel_util.o
kernel_vm.o
kernel_arch_$(TARGET_ARCH).o
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_lib_posix.o
kernel_lib_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_cache.o
kernel_core.o
kernel_debug.o
kernel_device_manager.o
kernel_disk_device_manager.o
kernel_fs.o
kernel_messaging.o
kernel_posix.o
kernel_slab.o
kernel_util.o
kernel_vm.o
kernel_arch_$(TARGET_ARCH).o
kernel_platform_$(TARGET_BOOT_PLATFORM).o
linkhack.so
# kernel libroot parts
kernel_os_main.o
kernel_os_arch_$(TARGET_ARCH).o
kernel_lib_posix.o
kernel_lib_posix_arch_$(TARGET_ARCH).o
kernel_misc.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 posix ;
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) ;
}