Skip to content

Commit

Permalink
* comment, clean up scheduler
Browse files Browse the repository at this point in the history
* 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 9682400
Show file tree
Hide file tree
Showing 14 changed files with 541 additions and 425 deletions.
4 changes: 2 additions & 2 deletions src/runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) $<
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/amd64_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -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*);

4 changes: 3 additions & 1 deletion src/runtime/chan.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ sys·selectgo(Select *sel)
SudoG *sg;
G *gp;

byte *ae, *as;
byte *as;

if(xxx) {
prints("selectgo: sel=");
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion src/runtime/map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/runtime/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
void
dump(byte *p, int32 n)
{
uint32 v;
int32 i;

for(i=0; i<n; i++) {
Expand Down
Loading

0 comments on commit 9682400

Please sign in to comment.