*.c -> *.cpp

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34417 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-12-01 17:06:26 +00:00
parent 8de72f9d58
commit bd185b4117
52 changed files with 63 additions and 113 deletions

View File

@ -36,7 +36,7 @@ SharedLibrary libuserlandfs_haiku_kernel.so
# kernel
block_cache.cpp
file_map.cpp
khash.c
khash.cpp
Notifications.cpp
Referenceable.cpp
@ -67,7 +67,7 @@ SEARCH on [ FGristFiles
] = [ FDirName $(HAIKU_TOP) src system kernel cache ] ;
SEARCH on [ FGristFiles
khash.c
khash.cpp
] = [ FDirName $(HAIKU_TOP) src system kernel util ] ;
SEARCH on [ FGristFiles

View File

@ -3,7 +3,7 @@ SubDir HAIKU_TOP src system boot arch x86 ;
DEFINES += _BOOT_MODE ;
local kernelArchSources =
arch_elf.c
arch_elf.cpp
;
local kernelArchObjects =

View File

@ -68,7 +68,7 @@ KernelStaticLibrary boot_loader :
# utils
kernel_cpp.cpp
KMessage.cpp
list.c
list.cpp
safemode_settings.cpp
: -fno-pic
@ -89,7 +89,7 @@ KernelStaticLibrary boot_partitions :
;
# Tell Jam where to find the utility sources
SEARCH on [ FGristFiles kernel_cpp.cpp list.c ]
SEARCH on [ FGristFiles kernel_cpp.cpp list.cpp ]
= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
SEARCH on [ FGristFiles KMessage.cpp ]

View File

@ -16,7 +16,7 @@ KernelMergeObject boot_platform_openfirmware.o :
support.cpp
video.cpp
openfirmware.c
openfirmware.cpp
openfirmware_devices.cpp
# generic
@ -27,7 +27,7 @@ KernelMergeObject boot_platform_openfirmware.o :
SEARCH on [ FGristFiles text_menu.cpp ]
= [ FDirName $(HAIKU_TOP) src system boot platform generic ] ;
SEARCH on [ FGristFiles openfirmware.c openfirmware_devices.cpp ]
SEARCH on [ FGristFiles openfirmware.cpp openfirmware_devices.cpp ]
= [ FDirName $(HAIKU_TOP) src system kernel platform openfirmware ] ;
SubInclude HAIKU_TOP src system boot platform openfirmware arch ;

View File

@ -26,11 +26,11 @@ KernelMergeObject kernel_core.o :
boot_splash.cpp
commpage.cpp
condition_variable.cpp
cpu.c
cpu.cpp
elf.cpp
heap.cpp
image.cpp
int.c
int.cpp
kernel_daemon.cpp
linkhack.c
listeners.cpp
@ -40,9 +40,9 @@ KernelMergeObject kernel_core.o :
module.cpp
Notifications.cpp
port.cpp
real_time_clock.c
real_time_clock.cpp
sem.cpp
shutdown.c
shutdown.cpp
signal.cpp
system_info.cpp
smp.cpp

View File

@ -28,7 +28,7 @@ KernelMergeObject kernel_arch_arm.o :
arch_vm.cpp
arch_vm_translation_map.cpp
arch_asm.S
uart.c
uart.cpp
generic_vm_physical_page_mapper.cpp
generic_vm_physical_page_ops.cpp
#

View File

@ -26,7 +26,7 @@ KernelMergeObject arch_m68k_060.o :
;
KernelMergeObject kernel_arch_m68k.o :
arch_atomic.c
arch_atomic.cpp
arch_commpage.cpp
arch_cpu.cpp
arch_cpu_asm.S
@ -37,7 +37,7 @@ KernelMergeObject kernel_arch_m68k.o :
arch_int.cpp
arch_platform.cpp
arch_real_time_clock.cpp
arch_smp.c
arch_smp.cpp
arch_system_info.cpp
arch_thread.cpp
arch_timer.cpp

View File

@ -8,7 +8,7 @@ SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
KernelMergeObject kernel_arch_mipsel.o :
arch_asm.S
arch_atomic.c
arch_atomic.cpp
arch_commpage.cpp
arch_cpu.cpp
arch_debug_console.cpp
@ -18,9 +18,9 @@ KernelMergeObject kernel_arch_mipsel.o :
arch_int.cpp
arch_platform.cpp
arch_real_time_clock.cpp
arch_smp.c
arch_smp.cpp
arch_system_info.cpp
arch_thread.c
arch_thread.cpp
arch_timer.cpp
arch_user_debugger.cpp
arch_vm.cpp

View File

@ -6,7 +6,7 @@ UsePrivateKernelHeaders ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) $(DOTDOT) generic ] ;
KernelMergeObject kernel_arch_ppc.o :
arch_atomic.c
arch_atomic.cpp
arch_commpage.cpp
arch_cpu.cpp
arch_cpu_asm.S

View File

@ -14,20 +14,20 @@ KernelMergeObject kernel_arch_x86.o :
arch_commpage.cpp
arch_cpu.cpp
arch_debug.cpp
arch_debug_console.c
arch_elf.c
arch_debug_console.cpp
arch_elf.cpp
arch_int.cpp
arch_platform.c
# arch_selector.c
arch_real_time_clock.c
arch_smp.c
arch_platform.cpp
# arch_selector.cpp
arch_real_time_clock.cpp
arch_smp.cpp
arch_thread.cpp
arch_timer.c
arch_timer.cpp
arch_vm.cpp
arch_vm_translation_map.cpp
arch_x86.S
arch_interrupts.S
arch_system_info.c
arch_system_info.cpp
arch_user_debugger.cpp
apm.cpp
bios.cpp
@ -37,9 +37,9 @@ KernelMergeObject kernel_arch_x86.o :
x86_physical_page_mapper.cpp
x86_physical_page_mapper_large_memory.cpp
x86_pit.c
x86_apic.c
x86_apic.cpp
x86_hpet.cpp
x86_pit.cpp
:
$(TARGET_KERNEL_PIC_CCFLAGS)
;

View File

@ -42,7 +42,7 @@ static uint32 sCPUOSIds[B_MAX_CPU_COUNT];
static uint32 sAPICVersions[B_MAX_CPU_COUNT];
extern bool gUsingIOAPIC;
extern void init_sse(void);
extern "C" void init_sse(void);
static uint32
apic_read(uint32 offset)

View File

@ -62,7 +62,7 @@ get_cpuid(cpuid_info *info, uint32 eaxRegister, uint32 forCPU)
status_t
arch_get_system_info(system_info *info, size_t size)
{
info->cpu_type = sCpuType;
info->cpu_type = (cpu_types)sCpuType;
info->cpu_revision = sCpuRevision;
// - various cpu_info
@ -148,7 +148,7 @@ _user_get_cpuid(cpuid_info *userInfo, uint32 eaxRegister, uint32 cpuNum)
{
cpuid_info info;
status_t status;
if (!IS_USER_ADDRESS(userInfo))
return B_BAD_ADDRESS;

View File

@ -35,7 +35,7 @@ SEARCH_SOURCE += [ FDirName $(posixSources) unistd ] ;
KernelMergeObject kernel_lib_posix.o :
# main
kernel_errno.c
kernel_errno.cpp
dirent.c
fcntl.cpp
poll.c
@ -44,7 +44,7 @@ KernelMergeObject kernel_lib_posix.o :
ctype.c
localeconv.c
# stdio (this subdir)
kernel_vsprintf.c
kernel_vsprintf.cpp
# stdlib
abs.c
atoi.c

View File

@ -4,6 +4,6 @@ SubDirCcFlags $(TARGET_KERNEL_PIC_CCFLAGS) ;
SubDirC++Flags $(TARGET_KERNEL_PIC_CCFLAGS) ;
KernelMergeObject kernel_platform_openfirmware.o :
openfirmware.c
openfirmware.cpp
openfirmware_devices.cpp
;

View File

@ -9,7 +9,7 @@
// OpenFirmware entry function
static int (*gCallOpenFirmware)(void *) = 0;
static int (*gCallOpenFirmware)(void *) = 0;
int gChosen;
@ -50,13 +50,13 @@ of_call_client_function(const char *method, int numArgs, int numReturns, ...)
// clear return values
args.args[i] = NULL;
}
if (gCallOpenFirmware(&args) == OF_FAILED)
return OF_FAILED;
if (numReturns > 0) {
// copy return values over to the provided location
for (i = numArgs; i < numArgs + numReturns; i++) {
void **store = va_arg(list, void **);
if (store)
@ -106,7 +106,7 @@ of_interpret(const char *command, int numArgs, int numReturns, ...)
if (numReturns > 0) {
// copy return values over to the provided location
for (i = numArgs + 1; i < numArgs + 1 + numReturns; i++) {
void **store = va_arg(list, void **);
if (store)
@ -157,7 +157,7 @@ of_call_method(int handle, const char *method, int numArgs, int numReturns, ...)
if (numReturns > 0) {
// copy return values over to the provided location
for (i = numArgs + 1; i < numArgs + 1 + numReturns; i++) {
void **store = va_arg(list, void **);
if (store)
@ -170,7 +170,7 @@ of_call_method(int handle, const char *method, int numArgs, int numReturns, ...)
}
int
int
of_finddevice(const char *device)
{
struct {
@ -271,7 +271,7 @@ of_instance_to_path(int instance, char *pathBuffer, int bufferSize)
}
int
int
of_instance_to_package(int instance)
{
struct {
@ -289,7 +289,7 @@ of_instance_to_package(int instance)
}
int
int
of_getprop(int package, const char *property, void *buffer, int bufferSize)
{
struct {
@ -310,7 +310,7 @@ of_getprop(int package, const char *property, void *buffer, int bufferSize)
}
int
int
of_setprop(int package, const char *property, const void *buffer, int bufferSize)
{
struct {
@ -393,7 +393,7 @@ of_package_to_path(int package, char *pathBuffer, int bufferSize)
// I/O functions
int
int
of_open(const char *nodeName)
{
struct {
@ -425,7 +425,7 @@ of_close(int handle)
}
int
int
of_read(int handle, void *buffer, int bufferSize)
{
struct {
@ -445,7 +445,7 @@ of_read(int handle, void *buffer, int bufferSize)
}
int
int
of_write(int handle, const void *buffer, int bufferSize)
{
struct {
@ -465,7 +465,7 @@ of_write(int handle, const void *buffer, int bufferSize)
}
int
int
of_seek(int handle, long long pos)
{
struct {
@ -488,32 +488,32 @@ of_seek(int handle, long long pos)
int
of_release(void *virtual, int size)
of_release(void *virtualAddress, int size)
{
struct {
const char *name;
int num_args;
int num_returns;
void *virtual;
void *virtualAddress;
int size;
} args = {"release", 2, 0, virtual, size};
} args = {"release", 2, 0, virtualAddress, size};
return gCallOpenFirmware(&args);
}
void *
of_claim(void *virtual, int size, int align)
of_claim(void *virtualAddress, int size, int align)
{
struct {
const char *name;
int num_args;
int num_returns;
void *virtual;
void *virtualAddress;
int size;
int align;
void *address;
} args = {"claim", 3, 1, virtual, size, align};
} args = {"claim", 3, 1, virtualAddress, size, align};
if (gCallOpenFirmware(&args) == OF_FAILED)
return NULL;

View File

@ -5,9 +5,9 @@ UsePrivateHeaders [ FDirName kernel util ] ;
KernelMergeObject kernel_util.o :
AVLTreeMap.cpp
kernel_cpp.cpp
khash.c
list.c
queue.c
khash.cpp
list.cpp
queue.cpp
ring_buffer.cpp
RadixBitmap.cpp

View File

@ -1,50 +0,0 @@
/* This includes some functions that were part of the net piece */
/*
** Copyright 2001, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#include <ktypes.h>
#include <debug.h>
/* XXX - keep the compiler happy. */
uint16 ones_sum16(uint32 sum, const void *_buf, int len);
uint16 cksum16(void *_buf, int len);
uint16 cksum16_2(void *buf1, int len1, void *buf2, int len2);
uint16 ones_sum16(uint32 sum, const void *_buf, int len)
{
const uint16 *buf = _buf;
while(len >= 2) {
sum += *buf++;
if(sum & 0x80000000)
sum = (sum & 0xffff) + (sum >> 16);
len -= 2;
}
if (len) {
uint8 temp[2];
temp[0] = *(uint8 *) buf;
temp[1] = 0;
sum += *(uint16 *) temp;
}
while(sum >> 16)
sum = (sum & 0xffff) + (sum >> 16);
return sum;
}
uint16 cksum16(void *_buf, int len)
{
return ~ones_sum16(0, _buf, len);
}
uint16 cksum16_2(void *buf1, int len1, void *buf2, int len2)
{
uint32 sum;
sum = ones_sum16(0, buf1, len1);
return ~ones_sum16(sum, buf2, len2);
}

View File

@ -43,7 +43,7 @@ queue_remove_item(queue *_q, void *e)
if (last)
last->next = temp->next;
else
q->head = temp->next;
q->head = (queue_element*)temp->next;
if (q->tail == temp)
q->tail = last;
@ -51,7 +51,7 @@ queue_remove_item(queue *_q, void *e)
return 0;
}
last = temp;
temp = temp->next;
temp = (queue_element*)temp->next;
}
return -1;
@ -85,7 +85,7 @@ queue_dequeue(queue *_q)
elem = q->head;
if (q->head != NULL)
q->head = q->head->next;
q->head = (queue_element*)q->head->next;
if (q->tail == elem)
q->tail = NULL;
@ -113,7 +113,7 @@ fixed_queue_init(fixed_queue *q, int size)
if (size <= 0)
return EINVAL;
q->table = malloc(size * sizeof(void *));
q->table = (void**)malloc(size * sizeof(void *));
if (!q->table)
return ENOMEM;
q->head = 0;

View File

@ -20,7 +20,7 @@ AddResources runtime_loader : runtime_loader.rdef ;
# needed for "runtime_loader" only
StaticLibrary libruntime_loader.a :
kernel_vsprintf.c
kernel_vsprintf.cpp
kernel_cpp.cpp
KMessage.cpp
:
@ -62,7 +62,7 @@ StaticLibrary libruntime_loader.a :
SEARCH on [ FGristFiles kernel_cpp.cpp ]
= [ FDirName $(HAIKU_TOP) src system kernel util ] ;
SEARCH on [ FGristFiles kernel_vsprintf.c ]
SEARCH on [ FGristFiles kernel_vsprintf.cpp ]
= [ FDirName $(HAIKU_TOP) src system kernel lib ] ;
SEARCH on [ FGristFiles KMessage.cpp ]
= [ FDirName $(HAIKU_TOP) src system kernel messaging ] ;