/SPARTAN/trunk/test/synch/rwlock4/test.c |
---|
33,6 → 33,7 |
#include <proc/thread.h> |
#include <arch/types.h> |
#include <arch/context.h> |
#include <context.h> |
#include <panic.h> |
#include <synch/waitq.h> |
/SPARTAN/trunk/include/memstr.h |
---|
32,8 → 32,7 |
#include <typedefs.h> |
#include <arch/types.h> |
extern char *memcpy(void * dst, const void *src, size_t cnt); |
extern char *memcopy(void * dst, const void *src, size_t cnt); |
#define memcpy(dst, src, cnt) __builtin_memcpy((dst), (src), (cnt)); |
extern void memsetw(__address dst, size_t cnt, __u16 x); |
extern void memsetb(__address dst, size_t cnt, __u8 x); |
43,7 → 42,7 |
/* |
* Architecture independent variants. |
*/ |
extern char *_memcopy(void *dst, const void *src, size_t cnt); |
extern char *_memcpy(void *dst, const void *src, size_t cnt); |
extern void _memsetb(__address dst, size_t cnt, __u8 x); |
extern void _memsetw(__address dst, size_t cnt, __u16 x); |
/SPARTAN/trunk/src/main/kinit.c |
---|
131,7 → 131,7 |
a = vm_area_create(m, VMA_TEXT, 1, UTEXT_ADDRESS); |
if (!a) panic("vm_area_create: vm_text"); |
vm_area_map(a, m); |
memcopy(PA2KA(a->mapping[0]), (__address) utext, utext_size < PAGE_SIZE ? utext_size : PAGE_SIZE); |
memcpy((void *) PA2KA(a->mapping[0]), (void *) utext, utext_size < PAGE_SIZE ? utext_size : PAGE_SIZE); |
/* |
* Create the data vm_area. |
/SPARTAN/trunk/src/lib/memstr.c |
---|
41,7 → 41,7 |
* @param cnt Number of bytes to copy. |
* |
*/ |
char *_memcopy(void * dst, const void *src, size_t cnt) |
char *_memcpy(void * dst, const void *src, size_t cnt) |
{ |
int i; |
51,7 → 51,6 |
return (char *)src; |
} |
/** Fill block of memory |
* |
* Fill cnt bytes at dst address with the value x. |
/SPARTAN/trunk/src/mm/vm.c |
---|
66,7 → 66,7 |
src_ptl0 = (pte_t *) PA2KA((__address) GET_PTL0_ADDRESS()); |
dst_ptl0 = (pte_t *) frame_alloc(FRAME_KA | FRAME_PANIC); |
memcopy((void *)PA2KA((__address) dst_ptl0), (void *)GET_PTL0_ADDRESS() , PAGE_SIZE); |
memcpy((void *)PA2KA((__address) dst_ptl0), (void *)GET_PTL0_ADDRESS() , PAGE_SIZE); |
m->ptl0 = (pte_t *) KA2PA((__address) dst_ptl0); |
} |
} |
/SPARTAN/trunk/arch/ppc/src/dummy.s |
---|
29,7 → 29,6 |
.text |
.global memcpy |
.global memcopy |
.global cpu_priority_read |
.global memsetb |
.global userspace |
46,7 → 45,6 |
.global dummy |
memcpy: |
memcopy: |
cpu_priority_read: |
memsetb: |
before_thread_runs_arch: |
/SPARTAN/trunk/arch/ia64/src/asm.S |
---|
30,19 → 30,8 |
.global memcpy |
memcpy: |
/* |
* Switch the role of first two arguments |
*/ |
sub r33 = r33, r32 ;; |
add r32 = r32, r33 ;; |
sub r33 = r32, r33 |
br _memcopy |
br _memcpy |
.global memcopy |
memcopy: |
br _memcopy |
.global memsetb |
memsetb: |
br _memsetb |
/SPARTAN/trunk/arch/mips/src/asm.s |
---|
150,9 → 150,9 |
j _memsetb |
nop |
.global memcopy |
memcopy: |
j _memcopy |
.global memcpy |
memcpy: |
j _memcpy |
nop |
# THIS IS USERSPACE CODE |
/SPARTAN/trunk/arch/amd64/src/supplib.c |
---|
30,16 → 30,6 |
/* TODO: Rewrite to assembler */ |
char *memcpy(void *dst, const void *src, size_t cnt) |
{ |
_memcopy(dst, src, cnt); |
} |
char *memcopy(void * dst, const void *src, size_t cnt) |
{ |
_memcopy(dst, src, cnt); |
} |
void memsetw(__address dst, size_t cnt, __u16 x) |
{ |
_memsetw(dst, cnt, x); |
/SPARTAN/trunk/arch/amd64/src/dummy.s |
---|
50,6 → 50,7 |
.global frame_arch_init |
.global dummy |
.global asm_delay_loop |
.global memcpy |
cpu_priority_high: |
cpu_priority_low: |
73,6 → 74,7 |
cpu_halt: |
page_arch_init: |
frame_arch_init: |
memcpy: |
dummy: |
0: |
/SPARTAN/trunk/arch/ia32/src/asm.S |
---|
43,7 → 43,7 |
.global outb |
.global outw |
.global outl |
.global memcopy |
.global memcpy |
.global memsetb |
.global memsetw |
.global memcmp |
265,7 → 265,7 |
SRC=12 |
DST=8 |
CNT=16 |
memcopy: |
memcpy: |
push %ebp |
movl %esp,%ebp |
pusha |
/SPARTAN/trunk/arch/ia32/src/smp/mps.c |
---|
312,7 → 312,7 |
{ |
#ifdef MPSCT_VERBOSE |
char buf[7]; |
memcopy((void *) buf, (void *) bus->bus_type, 6); |
memcpy((void *) buf, (void *) bus->bus_type, 6); |
buf[6] = 0; |
printf("bus%d: %s\n", bus->bus_id, buf); |
#endif |
/SPARTAN/trunk/arch/ia32/src/smp/smp.c |
---|
139,7 → 139,7 |
if (!(gdt_new = (struct descriptor *) malloc(GDT_ITEMS*sizeof(struct descriptor)))) |
panic("couldn't allocate memory for GDT\n"); |
memcopy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor)); // swaped |
memcpy(gdt_new, gdt, GDT_ITEMS*sizeof(struct descriptor)); |
memsetb((__address)(&gdt_new[TSS_DES]), sizeof(struct descriptor), 0); |
gdtr.base = KA2PA((__address) gdt_new); |
/SPARTAN/trunk/arch/ia32/src/mm/page.c |
---|
72,7 → 72,7 |
*/ |
dba = frame_alloc(FRAME_KA | FRAME_PANIC); |
memcopy((void *)dba,(void *)bootstrap_dba , PAGE_SIZE); //swaped |
memcpy((void *)dba, (void *)bootstrap_dba , PAGE_SIZE); |
write_cr3(KA2PA(dba)); |
} |
/SPARTAN/trunk/arch/ia32/src/drivers/ega.c |
---|
73,7 → 73,7 |
if (ega_cursor < SCREEN) |
return; |
memcopy((void *)PA2KA(VIDEORAM),(void *)(PA2KA(VIDEORAM) + ROW*2), (SCREEN - ROW)*2); //swaped |
memcpy((void *)PA2KA(VIDEORAM), (void *)(PA2KA(VIDEORAM) + ROW*2), (SCREEN - ROW)*2); |
memsetw(PA2KA(VIDEORAM) + (SCREEN - ROW)*2, ROW, 0x0720); |
ega_cursor = ega_cursor - ROW; |
} |