Skip to content
Permalink
Browse files
* comment, clean up scheduler
* rewrite lock implementation to be correct
  (tip: never assume that an algorithm you found
  in a linux man page is correct.)
* delete unneeded void* arg from clone fn
* replace Rendez with Note
* comment mal better
* use 6c -w, fix warnings
* mark all assembly functions 7

R=r
DELTA=828  (338 added, 221 deleted, 269 changed)
OCL=13884
CL=13886
  • Loading branch information
rsc committed Aug 5, 2008
1 parent 5adbacb commit 96824000ed89d13665f6f24ddc10b3bf812e7f47
Show file tree
Hide file tree
Showing 14 changed files with 541 additions and 425 deletions.
@@ -49,10 +49,10 @@ clean:
rm -f *.$(O) *.a runtime.acid

%.$O: %.c
$(CC) $<
$(CC) -w $<

sys_file.$O: sys_file.c sys_types.h $(OS_H)
$(CC) -D$(GOARCH)_$(GOOS) $<
$(CC) -w -D$(GOARCH)_$(GOOS) $<

%.$O: %.s
$(AS) $<
@@ -48,6 +48,6 @@ struct stat {

// Linux-specific system calls
int64 futex(uint32*, int32, uint32, struct timespec*, uint32*, uint32);
int64 clone(int32, void*, M*, G*, void(*)(void*), void*);
int64 clone(int32, void*, M*, G*, void(*)(void));
int64 select(int32, void*, void*, void*, void*);

@@ -487,7 +487,7 @@ sys·selectgo(Select *sel)
SudoG *sg;
G *gp;

byte *ae, *as;
byte *as;

if(xxx) {
prints("selectgo: sel=");
@@ -630,6 +630,8 @@ sys·selectgo(Select *sel)
asynr:
asyns:
throw("asyn");
return; // compiler doesn't know throw doesn't return

gotr:
// recv path to wakeup the sender (sg)
if(xxx) {
@@ -199,7 +199,6 @@ sys·mapassign(Hmap *m, byte *ak, byte *av)
void
sys·mapassign1(Hmap *m, ...)
{
Link **ll;
byte *ak, *av;

ak = (byte*)&m + m->ko;
@@ -8,7 +8,6 @@
void
dump(byte *p, int32 n)
{
uint32 v;
int32 i;

for(i=0; i<n; i++) {

0 comments on commit 9682400

Please sign in to comment.