Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 71 → Rev 72

/SPARTAN/trunk/include/func.h
35,6 → 35,6
 
extern void halt(void);
 
extern int strcmp(char *src, char *dst);
extern int strcmp(const char *src, const char *dst);
 
#endif
/SPARTAN/trunk/include/memstr.h
29,12 → 29,13
#ifndef __MEMSTR_H__
#define __MEMSTR_H__
 
#include <typedefs.h>
#include <arch/types.h>
 
extern void memcopy(__address src, __address dst, int cnt);
extern void memcopy(__address src, __address dst, size_t cnt);
 
extern void memsetw(__address dst, int cnt, __u16 x);
extern void memsetb(__address dst, int cnt, __u8 x);
extern void memsetw(__address dst, size_t cnt, __u16 x);
extern void memsetb(__address dst, size_t cnt, __u8 x);
 
extern int memcmp(__address src, __address dst, int cnt);
 
41,7 → 42,7
/*
* Architecture independent variants.
*/
extern void _memcopy(__address src, __address dst, int cnt);
extern void _memsetb(__address dst, int cnt, __u8 x);
extern void _memcopy(__address src, __address dst, size_t cnt);
extern void _memsetb(__address dst, size_t cnt, __u8 x);
 
#endif
/SPARTAN/trunk/include/mm/heap.h
40,9 → 40,9
__u8 data[0];
};
 
extern void heap_init(__address heap, int size);
extern void heap_init(__address heap, __u32 size);
 
extern void *malloc(int size);
extern void *malloc(size_t size);
extern void free(void *ptr);
 
#endif
/SPARTAN/trunk/include/mm/vm.h
77,7 → 77,7
extern vm_t * vm_create(void);
extern void vm_destroy(vm_t *m);
 
extern vm_area_t *vm_area_create(vm_t *m, vm_type_t type, int size, __address addr);
extern vm_area_t *vm_area_create(vm_t *m, vm_type_t type, size_t size, __address addr);
extern void vm_area_destroy(vm_area_t *a);
 
extern void vm_area_map(vm_area_t *a);
/SPARTAN/trunk/src/lib/memstr.c
41,7 → 41,7
* @param cnt Number of bytes to copy.
*
*/
void _memcopy(__address src, __address dst, int cnt)
void _memcopy(__address src, __address dst, size_t cnt)
{
int i;
60,7 → 60,7
* @param x Value to fill.
*
*/
void _memsetb(__address dst, int cnt, __u8 x)
void _memsetb(__address dst, size_t cnt, __u8 x)
{
int i;
__u8 *p = (__u8 *) dst;
/SPARTAN/trunk/src/lib/func.c
61,7 → 61,7
* @return 0 if the strings are equal, 1 otherwise.
*
*/
int strcmp(char *src, char *dst)
int strcmp(const char *src, const char *dst)
{
int i;
/SPARTAN/trunk/src/mm/vm.c
56,7 → 56,7
{
}
 
vm_area_t *vm_area_create(vm_t *m, vm_type_t type, int size, __address addr)
vm_area_t *vm_area_create(vm_t *m, vm_type_t type, size_t size, __address addr)
{
pri_t pri;
vm_area_t *a;
/SPARTAN/trunk/src/mm/heap.c
42,10 → 42,10
static chunk_t *chunk0;
static spinlock_t heaplock;
 
void heap_init(__address heap, int size)
void heap_init(__address heap, __u32 size)
{
spinlock_initialize(&heaplock);
memsetb(heap,size,0);
memsetb(heap, size, 0);
chunk0 = (chunk_t *) heap;
chunk0->used = 0;
chunk0->size = size - sizeof(chunk_t);
56,7 → 56,7
/*
* Uses first-fit algorithm.
*/
void *malloc(int size)
void *malloc(size_t size)
{
pri_t pri;
chunk_t *x, *y, *z;
/SPARTAN/trunk/arch/ia32/src/ia32.c
67,7 → 67,7
}
}
 
void arch_post_mm_init()
void arch_post_mm_init(void)
{
if (config.cpu_active == 1) {
ega_init(); /* video */
74,7 → 74,7
}
}
 
void arch_late_init()
void arch_late_init(void)
{
if (config.cpu_active == 1) {
#ifdef __SMP__
/SPARTAN/trunk/arch/ia32/src/smp/mps.c
289,7 → 289,7
{
#ifdef MPSCT_VERBOSE
char buf[7];
memcopy((__address) bus->bus_type, (__address) buf,6);
memcopy((__address) bus->bus_type, (__address) buf, 6);
buf[6] = 0;
printf("bus%d: %s\n", bus->bus_id, buf);
#endif