read test
This commit is contained in:
parent
5fb5d0fac1
commit
ad78d69f48
2
Makefile
2
Makefile
@ -4,7 +4,7 @@ VPATH=str:byte:fmt:scan:uint:open:stralloc:unix:socket:buffer
|
|||||||
|
|
||||||
CC=egcc
|
CC=egcc
|
||||||
#CFLAGS=-I. -pipe -Wall -Os -march=pentiumpro -fomit-frame-pointer -fschedule-insns2 -Wall
|
#CFLAGS=-I. -pipe -Wall -Os -march=pentiumpro -fomit-frame-pointer -fschedule-insns2 -Wall
|
||||||
CFLAGS=-I. -I../dietlibc/include -pipe -Wall -Os -march=athlon -mcpu=athlon -malign-functions=2 -fomit-frame-pointer -fschedule-insns2
|
CFLAGS=-I. -I../dietlibc/include -pipe -Wall -Os -march=athlon -mcpu=athlon -malign-functions=2 -fomit-frame-pointer -fschedule-insns2 -g
|
||||||
#CFLAGS=-I../dietlibc/include -I. -pipe -Wall -Os -march=pentiumpro -mcpu=athlon -fomit-frame-pointer -fschedule-insns2 -Wall
|
#CFLAGS=-I../dietlibc/include -I. -pipe -Wall -Os -march=pentiumpro -mcpu=athlon -fomit-frame-pointer -fschedule-insns2 -Wall
|
||||||
#CFLAGS=-I../dietlibc/include -pipe -Os -march=pentiumpro -mcpu=pentiumpro -fomit-frame-pointer -fschedule-insns2 -Wall
|
#CFLAGS=-I../dietlibc/include -pipe -Os -march=pentiumpro -mcpu=pentiumpro -fomit-frame-pointer -fschedule-insns2 -Wall
|
||||||
|
|
||||||
|
8
t.c
8
t.c
@ -7,19 +7,26 @@
|
|||||||
#include "socket.h"
|
#include "socket.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "ip4.h"
|
#include "ip4.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#define rdtscl(low) \
|
#define rdtscl(low) \
|
||||||
__asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
|
__asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
|
||||||
|
|
||||||
int main(int argc,char* argv[]) {
|
int main(int argc,char* argv[]) {
|
||||||
|
char c;
|
||||||
|
printf("%d\n",buffer_getc(buffer_0,&c));
|
||||||
|
printf("%c\n",c);
|
||||||
|
#if 0
|
||||||
char buf[100]="01234567890123456789012345678901234567890123456789";
|
char buf[100]="01234567890123456789012345678901234567890123456789";
|
||||||
long a,b,c;
|
long a,b,c;
|
||||||
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
buf[ip4_fmt(buf,ip4loopback)]=0;
|
buf[ip4_fmt(buf,ip4loopback)]=0;
|
||||||
buffer_puts(buffer_1small,buf);
|
buffer_puts(buffer_1small,buf);
|
||||||
buffer_flush(buffer_1small);
|
buffer_flush(buffer_1small);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
buf[0]=0;
|
buf[0]=0;
|
||||||
buf[fmt_8long(buf,0)]=0;
|
buf[fmt_8long(buf,0)]=0;
|
||||||
puts(buf);
|
puts(buf);
|
||||||
@ -28,6 +35,7 @@ int main(int argc,char* argv[]) {
|
|||||||
rdtscl(b);
|
rdtscl(b);
|
||||||
/*byte_zero_djb(buf,j); */
|
/*byte_zero_djb(buf,j); */
|
||||||
// printf("\n%lu %d\n",b-a,c);
|
// printf("\n%lu %d\n",b-a,c);
|
||||||
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
buffer_puts(buffer_1small,"hello, world\n");
|
buffer_puts(buffer_1small,"hello, world\n");
|
||||||
buffer_flush(buffer_1small);
|
buffer_flush(buffer_1small);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user