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 @@
1+20110402
2+ revision to devsrv.c change [issue 244] to avoid two calls to delwaiting
13 20110330
24 call strtol not atoi for hex numbers [issue 255, mechiel]
35 20110329
emu/port/devsrv.c+18−9
@@ -594,23 +594,27 @@ srvread(Chan *c, void *va, long count, vlong offset) · 593 unmodified lines
594594 req.t3 = rc;
595595 csend(rd, &req);
596596
597− wait.fid = c->fid;
598− wait.rc = rc;
599− wait.wc = nil;
600− addwaiting(sp, &wait);
601−
602597 h = heap(dev.Rread);
603598 r = H2D(Sys_Rread *, h);
604599 ptradd(h);
605600 if(waserror()){
606601 ptrdel(h);
607602 destroy(r);
608− delwaiting(&wait);
609603 nexterror();
610604 }
611605
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+ }
612614 crecv(rc, r);
615+ poperror();
613616 delwaiting(&wait);
617+
614618 if(r->t1 != H)
615619 error(string2c(r->t1));
616620
@@ -694,19 +698,24 @@ srvwrite(Chan *c, void *va, long count, vlong offset) · 77 unmodified lines
694698 w = H2D(Sys_Rwrite *, h);
695699 ptradd(h);
696700
701+ if(waserror()){
702+ ptrdel(h);
703+ destroy(w);
704+ nexterror();
705+ }
706+
697707 wait.fid = c->fid;
698708 wait.rc = nil;
699709 wait.wc = wc;
700710 addwaiting(sp, &wait);
701−
702711 if(waserror()){
703712 delwaiting(&wait);
704− ptrdel(h);
705− destroy(w);
706713 nexterror();
707714 }
708715 crecv(wc, w);
716+ poperror();
709717 delwaiting(&wait);
718+
710719 if(w->t1 != H)
711720 error(string2c(w->t1));
712721 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
597597 req.t3 = rc;
598598 csend(rd, &req);
599599
600− wait.fid = c->fid;
601− wait.rc = rc;
602− wait.wc = nil;
603− addwaiting(sp, &wait);
604−
605600 h = heap(dev.Rread);
606601 r = H2D(Sys_Rread *, h);
607602 ptradd(h);
608603 if(waserror()){
609604 ptrdel(h);
610605 destroy(r);
611− delwaiting(&wait);
612606 nexterror();
613607 }
614608
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+ }
615617 crecv(rc, r);
618+ poperror();
616619 delwaiting(&wait);
620+
617621 if(r->t1 != H)
618622 error(string2c(r->t1));
619623
@@ -697,19 +701,24 @@ srvwrite(Chan *c, void *va, long count, vlong offset) · 77 unmodified lines
697701 w = H2D(Sys_Rwrite *, h);
698702 ptradd(h);
699703
704+ if(waserror()){
705+ ptrdel(h);
706+ destroy(w);
707+ nexterror();
708+ }
709+
700710 wait.fid = c->fid;
701711 wait.rc = nil;
702712 wait.wc = wc;
703713 addwaiting(sp, &wait);
704−
705714 if(waserror()){
706715 delwaiting(&wait);
707− ptrdel(h);
708− destroy(w);
709716 nexterror();
710717 }
711718 crecv(wc, w);
719+ poperror();
712720 delwaiting(&wait);
721+
713722 if(w->t1 != H)
714723 error(string2c(w->t1));
715724 poperror();
utils/qc/peep.c+3−0
@@ -319,6 +319,7 @@ uniqs(Reg *r) · 318 unmodified lines
319319 * if the system forces R0 to be zero,
320320 * convert references to $0 to references to R0.
321321 */
322+int
322323 regzer(Adr *a)
323324 {
324325 if(R0ISZERO) {
@@ -333,6 +334,7 @@ regzer(Adr *a) · 8 unmodified lines
333334 return 0;
334335 }
335336
337+int
336338 regtyp(Adr *a)
337339 {
338340
@@ -526,6 +528,7 @@ copyprop(Reg *r0) · 187 unmodified lines
526528 return copy1(v1, v2, r0->s1, 0);
527529 }
528530
531+int
529532 copy1(Adr *v1, Adr *v2, Reg *r, int f)
530533 {
531534 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