History

20110402-1151

forsyth committed 15 years ago

Commit eba5dd91 parent ef949cd5 files · +42 −19Browse files

Unified · Split

5 files
  1. CHANGES +2 −0
  2. emu/port/devsrv.c +18 −9
  3. include/version.h +1 −1
  4. os/port/devsrv.c +18 −9
  5. utils/qc/peep.c +3 −0
CHANGES+2−0
@@ -1,3 +1,5 @@
120110402
2 revision to devsrv.c change [issue 244] to avoid two calls to delwaiting
120110330320110330
2 call strtol not atoi for hex numbers [issue 255, mechiel]4 call strtol not atoi for hex numbers [issue 255, mechiel]
320110329520110329
emu/port/devsrv.c+18−9
@@ -594,23 +594,27 @@ srvread(Chan *c, void *va, long count, vlong offset) · 593 unmodified lines
594 req.t3 = rc;594 req.t3 = rc;
595 csend(rd, &req);595 csend(rd, &req);
596 596
597 wait.fid = c->fid;
598 wait.rc = rc;
599 wait.wc = nil;
600 addwaiting(sp, &wait);
601
602 h = heap(dev.Rread);597 h = heap(dev.Rread);
603 r = H2D(Sys_Rread *, h);598 r = H2D(Sys_Rread *, h);
604 ptradd(h);599 ptradd(h);
605 if(waserror()){600 if(waserror()){
606 ptrdel(h);601 ptrdel(h);
607 destroy(r);602 destroy(r);
608 delwaiting(&wait);
609 nexterror();603 nexterror();
610 }604 }
611 605
606 wait.fid = c->fid;
607 wait.rc = rc;
608 wait.wc = nil;
609 addwaiting(sp, &wait);
610 if(waserror()){
611 delwaiting(&wait);
612 nexterror();
613 }
612 crecv(rc, r);614 crecv(rc, r);
615 poperror();
613 delwaiting(&wait);616 delwaiting(&wait);
617
614 if(r->t1 != H)618 if(r->t1 != H)
615 error(string2c(r->t1));619 error(string2c(r->t1));
616 620
@@ -694,19 +698,24 @@ srvwrite(Chan *c, void *va, long count, vlong offset) · 77 unmodified lines
694 w = H2D(Sys_Rwrite *, h);698 w = H2D(Sys_Rwrite *, h);
695 ptradd(h);699 ptradd(h);
696 700
701 if(waserror()){
702 ptrdel(h);
703 destroy(w);
704 nexterror();
705 }
706
697 wait.fid = c->fid;707 wait.fid = c->fid;
698 wait.rc = nil;708 wait.rc = nil;
699 wait.wc = wc;709 wait.wc = wc;
700 addwaiting(sp, &wait);710 addwaiting(sp, &wait);
701
702 if(waserror()){711 if(waserror()){
703 delwaiting(&wait);712 delwaiting(&wait);
704 ptrdel(h);
705 destroy(w);
706 nexterror();713 nexterror();
707 }714 }
708 crecv(wc, w);715 crecv(wc, w);
716 poperror();
709 delwaiting(&wait);717 delwaiting(&wait);
718
710 if(w->t1 != H)719 if(w->t1 != H)
711 error(string2c(w->t1));720 error(string2c(w->t1));
712 poperror();721 poperror();
include/version.h+1−1
@@ -1 +1 @@
1#define VERSION "Fourth Edition (20110330)"1#define VERSION "Fourth Edition (20110402)"
os/port/devsrv.c+18−9
@@ -597,23 +597,27 @@ srvread(Chan *c, void *va, long count, vlong offset) · 596 unmodified lines
597 req.t3 = rc;597 req.t3 = rc;
598 csend(rd, &req);598 csend(rd, &req);
599 599
600 wait.fid = c->fid;
601 wait.rc = rc;
602 wait.wc = nil;
603 addwaiting(sp, &wait);
604
605 h = heap(dev.Rread);600 h = heap(dev.Rread);
606 r = H2D(Sys_Rread *, h);601 r = H2D(Sys_Rread *, h);
607 ptradd(h);602 ptradd(h);
608 if(waserror()){603 if(waserror()){
609 ptrdel(h);604 ptrdel(h);
610 destroy(r);605 destroy(r);
611 delwaiting(&wait);
612 nexterror();606 nexterror();
613 }607 }
614 608
609 wait.fid = c->fid;
610 wait.rc = rc;
611 wait.wc = nil;
612 addwaiting(sp, &wait);
613 if(waserror()){
614 delwaiting(&wait);
615 nexterror();
616 }
615 crecv(rc, r);617 crecv(rc, r);
618 poperror();
616 delwaiting(&wait);619 delwaiting(&wait);
620
617 if(r->t1 != H)621 if(r->t1 != H)
618 error(string2c(r->t1));622 error(string2c(r->t1));
619 623
@@ -697,19 +701,24 @@ srvwrite(Chan *c, void *va, long count, vlong offset) · 77 unmodified lines
697 w = H2D(Sys_Rwrite *, h);701 w = H2D(Sys_Rwrite *, h);
698 ptradd(h);702 ptradd(h);
699 703
704 if(waserror()){
705 ptrdel(h);
706 destroy(w);
707 nexterror();
708 }
709
700 wait.fid = c->fid;710 wait.fid = c->fid;
701 wait.rc = nil;711 wait.rc = nil;
702 wait.wc = wc;712 wait.wc = wc;
703 addwaiting(sp, &wait);713 addwaiting(sp, &wait);
704
705 if(waserror()){714 if(waserror()){
706 delwaiting(&wait);715 delwaiting(&wait);
707 ptrdel(h);
708 destroy(w);
709 nexterror();716 nexterror();
710 }717 }
711 crecv(wc, w);718 crecv(wc, w);
719 poperror();
712 delwaiting(&wait);720 delwaiting(&wait);
721
713 if(w->t1 != H)722 if(w->t1 != H)
714 error(string2c(w->t1));723 error(string2c(w->t1));
715 poperror();724 poperror();
utils/qc/peep.c+3−0
@@ -319,6 +319,7 @@ uniqs(Reg *r) · 318 unmodified lines
319 * if the system forces R0 to be zero,319 * if the system forces R0 to be zero,
320 * convert references to $0 to references to R0.320 * convert references to $0 to references to R0.
321 */321 */
322int
322regzer(Adr *a)323regzer(Adr *a)
323{324{
324 if(R0ISZERO) {325 if(R0ISZERO) {
@@ -333,6 +334,7 @@ regzer(Adr *a) · 8 unmodified lines
333 return 0;334 return 0;
334}335}
335 336
337int
336regtyp(Adr *a)338regtyp(Adr *a)
337{339{
338 340
@@ -526,6 +528,7 @@ copyprop(Reg *r0) · 187 unmodified lines
526 return copy1(v1, v2, r0->s1, 0);528 return copy1(v1, v2, r0->s1, 0);
527}529}
528 530
531int
529copy1(Adr *v1, Adr *v2, Reg *r, int f)532copy1(Adr *v1, Adr *v2, Reg *r, int f)
530{533{
531 int t;534 int t;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t