amiga-request@abcfd20.larc.nasa.gov (Amiga Sources/Binaries Moderator) (10/15/90)
Submitted-by: "Peter \rb{k" <poe@daimi.aau.dk> Posting-number: Volume 90, Issue 284 Archive-name: libraries/odinlib-2.7/part01 [ uuencoded library enclosed. one source module and two text files had to be uuencoded because of 8-bit characters and escape seqs ...tad ] This is release two of odin.library, containing Linda-like IPC- features for the Amiga. A few bugs in release one has been eliminated. Several features have been added, eg. It's now possible to wait for an envelope with a timeout, so you wont be blocked forever. Also you can now request that envelopes be posted to a specified messageport, so your task can be signalled when the envelope arrives. The documentation has been polished up too! And the examples are better and more extensive. #!/bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 1 (of 2)." # Contents: Makefile draw.c.uu odin.h odin.i odin.uu odin_lib.fd # odindemo1.c odinglue.asm odintest.c philosophers.c readme.uu # tasks.c # Wrapped by tadguy@abcfd20 on Sun Oct 14 15:18:10 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'Makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Makefile'\" else echo shar: Extracting \"'Makefile'\" \(747 characters\) sed "s/^X//" >'Makefile' <<'END_OF_FILE' X# X# Aztec-makefile X# X XCCFLAGS = XLINKOBJS = odinglue.o XLIBS = -lc XTMPDIR = RAM: X X.c.o: X copy $*.c $(TMPDIR) X cc $(CCFLAGS) -o $(TMPDIR)$@ $(TMPDIR)$*.c X Xall: odindemo1 odintest philosophers tasks draw X Xodindemo1: odindemo1.o odinglue.o X ln -o $(TMPDIR)$@ $(TMPDIR)$@.o $(LINKOBJS) $(LIBS) X copy $(TMPDIR)$@ $@ X Xodinglue.o: odinglue.asm X as odinglue X Xodintest: odintest.o odinglue.o X ln -o $(TMPDIR)$@ $(TMPDIR)$@.o $(LINKOBJS) $(LIBS) X copy $(TMPDIR)$@ $@ X Xphilosophers: philosophers.o odinglue.o X ln -o $(TMPDIR)$@ $(TMPDIR)$@.o $(LINKOBJS) $(LIBS) X copy $(TMPDIR)$@ $@ X Xtasks: tasks.o X ln -o $(TMPDIR)$@ $(TMPDIR)$@.o $(LIBS) X copy $(TMPDIR)$@ $@ X Xdraw: draw.o odinglue.o X ln -o $(TMPDIR)$@ $(TMPDIR)$@.o $(LINKOBJS) $(LIBS) X copy $(TMPDIR)$@ $@ END_OF_FILE if test 747 -ne `wc -c <'Makefile'`; then echo shar: \"'Makefile'\" unpacked with wrong size! fi # end of 'Makefile' fi if test -f 'draw.c.uu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'draw.c.uu'\" else echo shar: Extracting \"'draw.c.uu'\" \(16726 characters\) sed "s/^X//" >'draw.c.uu' <<'END_OF_FILE' Xbegin 666 draw.c XM+RHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJG XM*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BH*("!D<F%W+F,@5C$N,@H@($-R96%T960@Z XM,S`M075G+3DP(&)Y(%!E=&5R(-AR8N9K"B`@3&%S="!M;V1I9FEE9"`R+5-EQ XM<"TY,"!B>2!0971E<B#8<F+F:PH@(%1H:7,@:7,@:6X@=&AE(%!U8FQI8R!$7 XM;VUA:6XN"B`@1&5M;R!O9B!S;VUE(&9E871U<F5S(&]F(&]D:6XN;&EB<F%R" XM>0H@($1R87=S(&QI;F5S(&EN(&UU;'1I<&QE('=I;F1O=W,*("!#;VUP:6QE` XM<R!W:71H($%Z=&5C($,S+C0P02P@8V5R=&%I;FQY(&YO="!V97)Y($%.4TDMU XM;&EK90H@($Y"+B!5<V4@=&%B<VEZ92`](#,@9F]R(&)E<W0@;&]O:W,**BHJ! XM*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJB XM*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EI=&5M+3Y7:61T_ XM:"`](#$P*G-T<FQE;BAT97AT6VE=*3L*"0EI=&5M+3Y(96EG:'0@/2`Q,#L*L XM"0EI=&5M+3Y&;&%G<R`]($E414U415A4?$E414U%3D%"3$5$?$A)1TA#3TU0K XM.PH*"0ET="`]("AS=')U8W0@26YT=6E497AT("HI06QL;V-296UE;6)E<B@F\ XM<FLL*&QO;F<I<VEZ96]F*'-T<G5C="!);G1U:51E>'0I+$U%349?0TQ%05)\Q XM345-1E]054),24,I.PH)"6EF*'1T(#T]($Y53$PI(&=O=&\@8VQE86YU<#L*F XM"@D)='0M/D9R;VYT4&5N(#T@,#L@='0M/D)A8VM096X@/2`Q.PH)"71T+3Y$F XM<F%W36]D92`]($I!33(["@D)='0M/DE497AT(#T@*%5"651%("HI=&5X=%MI8 XM73L*"@D):71E;2T^271E;49I;&P@/2`H05!44BET=#L*"0EP<F5V7VET96T@= XM/2!I=&5M.PH)?0H*"49R965296UE;6)E<B@F<FLL1D%,4T4I.PH)<F5T=7)N^ XM(&UE;G4["@H)8VQE86YU<#H*"0E["@D)"49R965296UE;6)E<B@F<FLL5%)5. XM12D["@D)"7)E='5R;B!.54Q,.PH)"7T*"GT*"B\J(&9R964@;65M;W)Y('5S> XM960@8GD@365N=2`J+PIV;VED(&1E<W1R;WE?;65N=2AM96YU*0IS=')U8W0@! XM365N=2`J;65N=3L*>PH)<W1R=6-T($UE;G5)=&5M("II=&5M+"IN97AT7VET: XM96T["@ES=')U8W0@26YT=6E497AT("IT=#L*"@EI=&5M(#T@;65N=2T^1FER* XM<W1)=&5M.PH)1G)E94UE;2AM96YU+"AL;VYG*7-I>F5O9BAS=')U8W0@365N, XM=2DI.PH*"7=H:6QE*&ET96T@(3T@3E5,3"D@>PH)"49R965-96TH:71E;2T^K XM271E;49I;&PL*&QO;F<I<VEZ96]F*'-T<G5C="!);G1U:51E>'0I*3L*"0EN% XM97AT7VET96T@/2!I=&5M+3Y.97AT271E;3L*"0E&<F5E365M*&ET96T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=VAE;B!N97<@<VEZ92!I<R!S971T;&5D('5P0 XM;VX@*B\*(V1E9FEN92!$4D%715)?455)5"`R"0DO*B!A<VL@<F5F<F5S:&5RW XM('1O(&1I92`J+PHC9&5F:6YE($1205=%4E]355-014Y$(#,)+RH@87-K(')E7 XM9G)E<VAE<B!T;R!W86ET("HO"@HO*B!B;V1Y(&9O<B!E86-H(&]F('1H92!R[ XM969R97-H97)S('1A<VMS("AD<F%W97(I("HO"D5N=F5L;W!E("ID<F%W:6YGZ XM*&1R87=E;G8I"G-T<G5C="!$<F%W16YV("ID<F%W96YV.PI["@ES=')U8W0@G XM4F%S=%!O<G0@*FUY<G`["@EI;G0@=RQH+&%C=&EV93L*"7-T<G5C="!$<F%W> XM16YV("IE;G8["@H);7ER<"`](&1R87=E;G8M/G=I;F1O=RT^4E!O<G0["@EWZ XM(#T@9')A=V5N=BT^=VEN9&]W+3Y7:61T:#L*"6@@/2!D<F%W96YV+3YW:6YDI XM;W<M/DAE:6=H=#L*"6%C=&EV92`](%12544["@H)9&\@>PH)"65N=B`](&1RO XM87=?<&%T=&5R;BAM>7)P+'<L:"QD<F%W96YV+3YC;61N86UE*3L*"0ES=VET& XM8V@H96YV+3YT>7!E*2!["@D)"6-A<V4@1%)!5T527U%5250Z"@D)"0EA8W1I^ XM=F4@/2!&04Q313L)+RH@9&]N)W0@9&ES<&]S92`A("HO"@D)"0EB<F5A:SL*E XM"0D)8V%S92!$4D%715)?4U534$5.1#H*"0D)"2\J('1E;&P@=VEN9&]W;6%NC XM86=E<B!W92!A<F4@=V%I=&EN9R`J+PH)"0D)3W5T16UP='E%;G9E;&]P92AD^ XM<F%W96YV+3YR97!L>6YA;64I.PH)"0D)1&ES<&]S945N=F5L;W!E*&5N=BD[' XM"@D)"0DO*B!W86ET(&9O<B!U<V5R('1O(')E<VEZ92!W:6YD;W<@*B\*"0D)M XM"65N=B`]("AS=')U8W0@1')A=T5N=B`J*4%W86ET3F%M961%;G9E;&]P92AD+ XM<F%W96Y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T<F-P>2@F;F%M6 XM95MR=6YN:6YG75LP72PB<F5F<F5S:"(I*3L*"0D)"0E#4BAP<FEN=&8H(G1A8 XM<VMN86UE.B`E<UQN(BQW<"T^=&%S:VYA;64I.RD*"0D)"0EW<"T^;65N=2`]7 XM(&UE;G4["@D)"0D)+RH@<W!A=VX@;F5W('1A<VL@:68@<&]S<VEB;&4@*B\*9 XM"0D)"0EI9BA%=F%L*'=P+#%,+#@P,#!,+$5604Q?4%)/0T534RDI(')U;FYI4 XM;F<K*SL*"0D)"7T*"0D)"6)R96%K.PH)"0EC87-E($U!4U1%4E]$244Z"@D)S XM"0ER=6YN:6YG+2T["@D)"0EB<F5A:SL*"0D)9&5F875L=#H*"0D)"6)R96%K- XM.PH)"7T*"0E$:7-P;W-E16YV96QO<&4H87)G<RD["@E]('=H:6QE*')U;FYI; XM;F<I.PH*"61O7V5X:70Z"@D)>PH)"0EI9BAM96YU*2!D97-T<F]Y7VUE;G4HS XM;65N=2D["2\J(&9R964@;65M;W)Y('5S960@8GD@=&AE(&UE;G4@*B\*"0D)6 XM:68H26YT=6ET:6]N0F%S92D@0VQO<V5,:6)R87)Y*$EN='5I=&EO;D)A<V4I8 XM.PH)"0EI9BA'9GA"87-E*2!#;&]S94QI8G)A<GDH1V9X0F%S92D["@D)"6EFK XI*$]D:6Y"87-E*2!#;&]S94QI8G)A<GDH3V1I;D)A<V4I.PH)"7T*?0H)% X`` Xend Xsize 11921 END_OF_FILE if test 16726 -ne `wc -c <'draw.c.uu'`; then echo shar: \"'draw.c.uu'\" unpacked with wrong size! fi # end of 'draw.c.uu' fi if test -f 'odin.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'odin.h'\" else echo shar: Extracting \"'odin.h'\" \(3659 characters\) sed "s/^X//" >'odin.h' <<'END_OF_FILE' X/* odin.h */ X/* headerfile for odin.library. V2.7 2-Sep-90 */ X X#ifndef ODIN_H X#define ODIN_H 1 X X#ifndef EXEC_NODES_H X#include "exec/nodes.h" X#endif X#ifndef EXEC_LISTS_H X#include "exec/lists.h" X#endif X#ifndef EXEC_PORTS_H X#include "exec/ports.h" X#endif X#ifndef EXEC_SEMAPHORES_H X#include "exec/semaphores.h" X#endif X#ifndef EXEC_LIBRARIES_H X#include "exec/libraries.h" X#endif X#ifndef EXEC_TASKS_H X#include "exec/tasks.h" X#endif X#ifndef LIBRARIES_DOSEXTENS_H X#include "libraries/dosextens.h" X#endif X X#define ODINNAME "odin.library" X Xstruct OdinBase { X struct Library odin_LibNode; X BPTR odin_SegList; X UBYTE odin_Flags; X /* You MUST ObtainSemaphore() this before using X * the WaitList! X */ X struct SignalSemaphore odin_Sem; /* signal semaphore */ X struct MinList odin_WaitList; X}; X X#define odin_Sizeof sizeof(struct OdinBase) X X/* prefix for envelopes */ X Xtypedef struct _Env { X struct MinNode e_link; /* first a link for use in e-space */ X STRPTR e_name; /* the name of this envelope */ X ULONG e_len; /* bytelength of whole envelope */ X struct _Env * (*e_copyfunc)();/* opt. C-function for copying */ X struct _Env * (*e_proc)(); /* C-func. to call in Eval() */ X} Envelope; X X#define e_sizeof (ULONG)sizeof(Envelope) X X/* wait-structure used in WaitList. Used internally */ X Xstruct WaitStruct { X struct MinNode ow_link; X Envelope *ow_envelope; X struct Task *ow_waittask; X UBYTE ow_sigbit; X BYTE ow_type; X}; X X#define ow_replyport ow_waittask X#define ow_sizeof (ULONG)sizeof(struct WaitStruct) X X/* ow_types (used internally) */ X X#define RD_REQUEST 0 X#define IN_REQUEST 1 X#define ASYNCIN_REQUEST 2 X#define ASYNCRD_REQUEST 3 X X/* the et parameter to Eval() */ X X#define EVAL_PROCESS (long)0 X#define EVAL_TASK (long)1 X X/* the struct put to a MsgPort by AsyncIn/Rd */ X Xstruct EnvMsg { X struct Message em_msg; X Envelope *em_env; /* ptr to the returned envelope */ X}; X X#ifndef ANSI X/* function returntypes */ X#define NoCopyFunc 0L Xextern Envelope *In(),*Rd(),*Rdp(),*Inp(); Xextern void Out(); Xextern BOOL CopyOut(); Xextern struct Task *Eval(); Xextern struct Task *StartTask(); Xextern struct Process *StartProcess(); Xextern Envelope *AwaitNamedEnvelope(); Xextern Envelope *PollNamedEnvelope(); Xextern BOOL OutEmptyEnvelope(); Xextern Envelope *CreateEnvelope(),*InitEnvelope(); Xextern void DisposeEnvelope(); X/* version 2 additions */ Xextern Envelope *TimedIn(), *TimedRd(); Xextern void AsyncIn(), AsyncRd(); Xextern Envelope *AwaitTimed(); Xextern void AsyncRequest(); Xextern char *UniqueName(); X X#else X/* ANSI function-prototypes, worked with PDC 3.33 */ X#define NoCopyFunc (Envelope *(*cf)())0L Xextern Envelope *In(Envelope *); Xextern Envelope *Rd(Envelope *); Xextern Envelope *Rdp(Envelope *); Xextern Envelope *Inp(Envelope *); Xextern void Out(Envelope *); Xextern BOOL CopyOut(Envelope *); Xextern struct Task *Eval(Envelope *,long,ULONG,long); Xextern struct Task *StartTask(void(),char *,long,long); Xextern struct Process *StartProcess(void(),char *,long,long); Xextern Envelope *AwaitNamedEnvelope(char *); Xextern Envelope *PollNamedEnvelope(char *); Xextern BOOL OutEmptyEnvelope(char *); Xextern Envelope *CreateEnvelope(char *,ULONG); Xextern Envelope *InitEnvelope(Envelope *,char *,ULONG,Envelope *(*copyfunc)()); Xextern void DisposeEnvelope(Envelope *); X/* version 2 additions */ Xextern Envelope *TimedIn(Envelope *,ULONG,ULONG); Xextern Envelope *TimedRd(Envelope *,ULONG,ULONG); Xextern void AsyncIn(Envelope *,struct MsgPort *); Xextern void AsyncRd(Envelope *,struct MsgPort *); Xextern Envelope *AwaitTimed(char *,ULONG,ULONG); Xextern void AsyncRequest(char *,struct MsgPort *); Xextern char *UniqueName(char *); X#endif /* ANSI */ X X#endif /* ODIN_H */ END_OF_FILE if test 3659 -ne `wc -c <'odin.h'`; then echo shar: \"'odin.h'\" unpacked with wrong size! fi # end of 'odin.h' fi if test -f 'odin.i' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'odin.i'\" else echo shar: Extracting \"'odin.i'\" \(1282 characters\) sed "s/^X//" >'odin.i' <<'END_OF_FILE' X;odin2.i X;includefile for odin.library. X;using semaphore instead of spacemanager X;Last updated 27-aug-90 X;Version = 2.3 X X IFND ODIN_I XODIN_I EQU 1 X XodinNAME MACRO X DC.B 'odin.library',0 X CNOP 0,2 X ENDM X X STRUCTURE odin,LIB_SIZE X APTR odin_SegList X UBYTE odin_Flags X UBYTE odin_pad X ;------------------------------------------------ X ;- You must ObtainSemaphore() this before using X ;- WaitList! X ;------------------------------------------------ X STRUCT odin_Sem,SS_SIZE ;signal semaphore X STRUCT odin_WaitList,MLH_SIZE X LABEL odin_Sizeof X X;--- prefix for envelopes X X STRUCTURE Envelope,MLN_SIZE ;first a link for use in e-space X APTR e_name ;ptr to ASCIIZ string X ULONG e_len ;bytelength of contents X APTR e_copyfunc ;opt. C-function for copying X APTR e_proc ;C-function to call in Eval X LABEL e_sizeof X X;--- wait-structure used in WaitList X X STRUCTURE WaitStruct,MLN_SIZE X APTR ow_envelope X APTR ow_waittask X UBYTE ow_sigbit X BYTE ow_type X LABEL ow_sizeof X Xow_replyport EQU ow_waittask X X;--- ow_types X XRD_REQUEST EQU 0 XIN_REQUEST EQU 1 XASYNCIN_REQUEST EQU 2 XASYNCRD_REQUEST EQU 3 X X;--- the et parameter to Eval() X XEVAL_PROCESS EQU 0 XEVAL_TASK EQU 1 X X;--- the struct put to a MsgPort by AsyncIn/AsyncRd X X STRUCTURE EnvMsg,MN_SIZE X APTR em_env; X LABEL em_sizeof X X ENDC !ODIN_I END_OF_FILE if test 1282 -ne `wc -c <'odin.i'`; then echo shar: \"'odin.i'\" unpacked with wrong size! fi # end of 'odin.i' fi if test -f 'odin.uu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'odin.uu'\" else echo shar: Extracting \"'odin.uu'\" \(5666 characters\) sed "s/^X//" >'odin.uu' <<'END_OF_FILE' Xbegin 666 odin.library XM```#\P`````````$``````````,```-2````%0````\```#D```#Z0```U)P+ XM"DYU2OP````$```-2(`""0`````>````+````$IO9&EN+FQI8G)A<GD``&]DK XM:6XN;&EB<F%R>2`R+C<@*#(@4V5P(#DP*0T*`````&(```!:````Q@```/(`P XM``%T```!@@```90```'<```'*````>````=8```%1```!C@```'P```"A@``9 XM`S8```=N```$=```!+(```3J```&V```!O8```<4```'E```")8```FP```*[ XM1```"NH```L0```+0O_____@```,"0#````*````'N````X&`-```!0``M``C XM`!8`!\```!@````L`````"\-*D`CP`````0K2``B0_D`````<`!.KOW8(\``C XM````9@HN/(`#@`=.KO^40>T`*$ZN_=)![0!6((A8D$*H``0A2``(0?D````() XM,#P`/R"(6)!"J``$(4@`"$'H``Q1R/_N0?D```,(3J[]TD'Y```#AD*00J@`D XM!!#\`#`@#2I?3G4(K@`#`"92;@`@(`Y.=7``4VX`(&8(""X``P`F80).=4CG< XM(`8J3BQX``1*;0`@9PH([0`#`"9P`&`H)"T`(B)-3J[_!")Y`````$ZN_F)PL XM`")-,"T`$)+`T&T`$DZN_RX@`DS?8`1.=7``3G4C2``((T``#"-*`!`@"4YU8 XM2.<`)BI.)$DL>``$0>T`*$ZN_<P@2F$`"<9*@&<680`)^B1`0>T`*$ZN_<8@; XM"DS?9`!.=4_O_^XO2@`(+VX!%``,'WP``0`1</].KOZV(D\30``00>T`5D'H3 XM``0@*``$(4D`!"*((T``!"!`((E![0`H3J[]QA(O`!!P``/`3J[^PG``$"\`< XM$$ZN_K`@+P`(3^\`$F"82.<`)BI.)$DL>``$0>T`*$ZN_<P@2F$`"3!*@&<LW XM($`B2DS?9`!A``EL2.<`!BIY````!"QX``1![0`H*D!.KOW&(`U,WV``3G5/^ XM[__N+TH`""]N`10`#!]\````$7#_3J[^MB)/$T``$$'M`%9!Z``$("@`!"%)A XM``0BB"-```0@0"")0>T`*$ZN_<82+P`0<`'CJ$ZN_L)P`!`O`!!.KOZP("\`T XM"$_O`!),WV0`3G5(YP`^*DXD22QX``1![0`H3J[]S")J``AA``A@($DB2D'H: XM``0@*``$(4D`!"*((T``!"!`((E'[0!6)E-*DV<``/`@:P`((&@`"")J``BSY XMR&<*$!BP&6;B2@!F]B)+*$DF42!1(FD`!"*((4D`!$*4$"P`$0P```%F'BE*L XM``@@"F$`"%(2+``0<`'CJ")L``Q.KOZ\8```F@P```!F,$CG`#X@2B)L``A,< XM[WP``!1A``@T3-]\`"E```@2+``0<`'CJ")L``Q.KOZ\8`#_<`P```)F)&$`6 XM"1(O`"`*80`']B!L``PB7R-``!1.KOZ2(DQP$DZN_RY@.$CG`#X@2B)L``A,8 XM[WP``!1A``?:3-]\`"\`80`(U")`(&P`#"-?`!1.KOZ2(DQP$DZN_RY@`/\.V XM0>T`*$ZN_<9,WWP`3G4O"B1)(FH`"$'Z`!1*@F8&3J[_RF`$3J[_T"1?3G4OI XM"DAZ``@O*@`43G58CR)`2H!G"BQY````!$[N_[A.=4CG`"8J3B1)+'@`!$'MW XM`"A.KOW,($IA``<$2H!G%F$`!S@D0$'M`"A.KOW&(`I,WV0`3G5P`&#J2.<`( XM)BI.)$DL>``$0>T`*$ZN_<P@2F$`!LQ*@&800>T`*$ZN_<9P`$S?9`!.=2!`B XM(DI,WV0`80`&^$CG``8L>``$*GD````$0>T`*"I`3J[]QB`-3-]@`$YU2.?`' XMPBQX``1!^0```PA.KOW,3-]#`TCY?_\```,X2.<X.B/(```#>"9)*``F`2QX( XM``1!^0```!HA0P`43J[_(@B``!]F``":(\````.`)$`D*@`0)&H`&!5\``$`T XM"!5$``DE2P`*)4(`.M2#)4(`/E6")4(`-D'J`$H@B%B00J@`!"%(``@1?``*P XM``QP_TZN_K83P````S9K/"/N`10```-\,_P``0```X0B2BA*1?D`````E\M.& XMKO[F$CD```,V<`'CJ$ZN_L)P`!`Y```#-DZN_K!@#"!Y```#@$ZN_QR9S$'YH XM```#"$ZN_<8@#$S?7!Q.=4CGP,(L>``$0?D```,(3J[]S$S?0P-(^7__```#R XM.$CG/`(CR````W@H`2H))``L>``$</].KOZV$\````,V:UPC[@$4```#?$)Y% XM```#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L"`O``A/[P`23-]D#$YU+WS_____4 XM``A@MDCG`#XJ3B9()$DL>``$0>T`*$ZN_<P@2F$``@1*@&<H+P!A``-**$`@P XM'V$``BXI0``4($LB3$ZN_I)![0`H3J[]QDS??`!.=7`2(CP``0`!3J[_.B)`* XM2H!G*B-*``@C2P`,$WP``@`10>T`5D'H``0@*``$(4D`!"*((T``!"!`((E@1 XMMB\'+CP``0``3J[_E"X?8*9(YP`^*DXF2"1)+'@`!$'M`"A.KOW,($IA``%PX XM2H!G.B\`80`"MBA`(!](YP`^($`B2DSO?```%&$``9Q,WWP`*4``%"!+(DQ.G XMKOZ20>T`*$ZN_<9,WWP`3G5P$B(\``$``4ZN_SHB0$J`9RHC2@`((TL`#!-\/ XM``,`$4'M`%9!Z``$("@`!"%)``0BB"-```0@0"")8+8O!RX\``$``$ZN_Y0N- XM'V"F+PI/[__H(D](Y\``<!B5RDZN_]PB0$S?``-.KO^(3^\`&"1?3G4B3R\`P XM<!A.KO_B2H!G"B)`(%].KO]\3G5(YP$"+CP``0``+'@`!$ZN_Y1,WT"`6(].O XM=4CG`((L>``$+PA!^0```PA.KOW,(%]*&&;\4XA#^0```X80$68$$#P`,%(`+ XM#```.F8&$OP`06`:#```6V8&$OP`86`.#```>V8&$OP`,$H!#^0```X80U XMV6;\0?D```,(3J[]QDS?00`@"$YU<`!R`!(99P30`6#X`D``/\#\``Q#^0``\ XM``C3P$YU2.<`,"1((FH`"&'6L^D`"&<B(E$@:0`()FH`"+?(9PH0&+`;9@A*8 XM`&;V(`E@"")12I%FX'``3-\,`$YU(D`@42)I``0BB"%)``1.=4JH`!!F$"`HH XM``PB"1+84X!F^B`!3G4O"2\((&@`$$Z04(].=4CG`"(L>``$80``BB1`2H!GX XM2G`H(CP``0`!3J[_.DJ`9S8O`")`0?D````,<`%R`$ZN_D1*@&88(E\3?``%S XM``@C2@`.,WP`*``23-]$`$YU(E]P*$ZN_RXB2F%HD\E,WT0`3G6S_`````!FX XM`DYU+PXL>``$+PE.KOX@(E=.KOX^(E<B:0`.83PB7W`H3J[_+BQ?3G4O"W`BX XM(CP``0`!3J[_.B9`2H!G&"=N`10`$'#_3J[^MA=```\B2TZN_IX@"R9?3G4OJ XM"4ZN_I@B5W``$"D`#TZN_K`B7W`B3J[_+DYU<!@B/``!``%.KO\Z2H!G"B!`M XM,7P`&``23G4O!RX\``$``$ZN_Y0N'TYU```#[````"0`````````!@````H`] XM```2````%@```!H```!.````4@```%8```!:````7@```&(```!F````:@``B XM`&X```!R````=@```'H```!^````@@```(8```"*````C@```)(```"6````6 XMF@```)X```"B````I@```*H```"N````L@```+8```"Z````O@```-````#JR XM`````@````$```7T```&B`````,````"```!`@``!7@```QF````)`````,`H XM``#X```!#@```3@```%6```!8````;H```*V```$J```!2X```5.```%7@``` XM!6@```6.```%V```!>(```7J```&````!A````8<```&*```!D(```92```&% XM7```!G(```9\```&@@``!I````:J```&N@``!L0```C*```+3@``"V````N6E XM```+H```"\8````````#\@```^D````5+'@`!$IY```#A&<D(&X!%$'H`$HBG XM>0```X!!Z``$("@`!"%)``0BB"-```0@0"")+SD```-X$CD```,V<`'CJ")Y[ XM```#?$ZN_KQ,^7__```#.$YU```#[`````8````#````!@```!8````R````\ XM.````$(```!.`````````_(```/J````#V1O<RYL:6)R87)Y`'1I;65R+F1EZ XM=FEC90`````````````*`````````@````$```````$``0```%Q.<0```_(`& X+``/K````Y````_(`' X`` Xend Xsize 4016 END_OF_FILE if test 5666 -ne `wc -c <'odin.uu'`; then echo shar: \"'odin.uu'\" unpacked with wrong size! fi # end of 'odin.uu' fi if test -f 'odin_lib.fd' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'odin_lib.fd'\" else echo shar: Extracting \"'odin_lib.fd'\" \(921 characters\) sed "s/^X//" >'odin_lib.fd' <<'END_OF_FILE' X*---- odin_lib.fd X*---- version.revision = 2.7 X##base _OdinBase X##bias 30 X##public X*---- basic functions XCreateEnvelope(name,size)(A0,D0) XInitEnvelope(envelope,name,len,copyfunc)(A1,A0,D0,A2) XDisposeEnvelope(envelope)(A1) X*---- creation of tasks/processes from procedures XStartTask(procedure,name,pri,stacksize)(A0/A1,D0/D1) XStartProcess(procedure,name,pri,stacksize)(A0/A1,D0/D1) X*---- Linda-like functions XIn(envelope)(A1) XRd(envelope)(A1) XOut(envelope)(A1) XCopyOut(envelope)(A1) XEval(envelope,pri,stacksize,et)(A1,D0/D1/D2) XInp(envelope)(A1) XRdp(envelope)(A1) X*---- ease-of-use functions XAwaitNamedEnvelope(name)(A0) XPollNamedEnvelope(name)(A0) XOutEmptyEnvelope(name)(A0) X*---- version 2 additions XTimedIn(env,secs,micros)(A1,D0/D1) XTimedRd(env,secs,micros)(A1,D0/D1) XAsyncIn(env,port)(A1,A0) XAsyncRd(env,port)(A1,A0) XAwaitTimed(name,secs,micros)(A0,D0/D1) XAsyncRequest(name,port)(A0,D0) XUniqueName(buffer)(A0) X##end END_OF_FILE if test 921 -ne `wc -c <'odin_lib.fd'`; then echo shar: \"'odin_lib.fd'\" unpacked with wrong size! fi # end of 'odin_lib.fd' fi if test -f 'odindemo1.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'odindemo1.c'\" else echo shar: Extracting \"'odindemo1.c'\" \(3331 characters\) sed "s/^X//" >'odindemo1.c' <<'END_OF_FILE' X/***********************************************/ X/* odindemo1.c */ X/* demo of odin.library */ X/* starts 2 new processes and sends envelopes */ X/* back and forth. */ X/* Created 7-Jul-90 by Peter Oerbaek */ X/* This code is in the public domain. */ X/* Link with odinglue.o */ X/***********************************************/ X X/********************************************************************** X A lot of checking is ommited in the code to make it smaller and X easier to read. X**********************************************************************/ X X#include "exec/types.h" X#include "exec/semaphores.h" X#include "stdio.h" X#include "odin.h" X Xstruct OdinBase *OpenLibrary(); Xstruct OdinBase *OdinBase; /* global base pointer */ X Xtypedef struct { X Envelope env; /* envelope-prefix used by odin routines */ X int num; /* package number */ X int stop; /* flag to stop consumers */ X} Pack; X X#define p_sizeof (long)sizeof(Pack) X Xtypedef struct { X Envelope e; /* envelope-prefix */ X char *windowname; /* name of windowfile to open */ X} StartEnv; X X#define se_sizeof (long)sizeof(StartEnv) X X/*** for use around C routines that are not re-entrant ***/ X Xstruct SignalSemaphore ss; X#define CRIT_REG(s) ObtainSemaphore(&ss); { s } ReleaseSemaphore(&ss); X X/**** the body for the processes ************/ X XEnvelope *processbody(se) XStartEnv *se; X{ X FILE *f; X int i,stop; X Pack *p; X X CRIT_REG(f = fopen(se->windowname,"w");) X CRIT_REG(fprintf(f,"Hello world\n");) X do { X p = (Pack *)AwaitNamedEnvelope("a packet"); X stop = p->stop; X CRIT_REG(fprintf(f,"Packet #%d received.\n",p->num);) X DisposeEnvelope(p); X } while(stop == 0); X CRIT_REG(fprintf(f,"Bye, bye...\n");) X Delay(100L); X CRIT_REG(fclose(f);) X return (Envelope *)se; X} X Xmain() X{ X StartEnv *env; X Pack *pack; X int i; X X printf("opening library\n"); X if(!(OdinBase = OpenLibrary("ram:odin.library",0L))) { X printf("Couldn't open odin.library\n"); X exit(20); X } X X /* set up semaphore */ X InitSemaphore(&ss); X X /* Ought to do an AddSemaphore() here, but that doesn't work X * in my ROM (KS 33.180) X */ X X printf("creating new processes\n"); X /* start first process */ X env = (StartEnv *)CreateEnvelope("newprocess1",se_sizeof); X env->e.e_proc = processbody; X env->windowname = "CON:10/10/300/100/Proc1"; X Eval(env,1L,4000L,EVAL_PROCESS); X X /* start next process */ X env = (StartEnv *)CreateEnvelope("newprocess2",se_sizeof); X env->e.e_proc = processbody; X env->windowname = "CON:310/20/300/100/Proc2"; X Eval(env,0L,4000L,EVAL_PROCESS); X X /* send some packages */ X for(i = 0; i < 10; i++) { X pack = (Pack *)CreateEnvelope("a packet",p_sizeof); X pack->num = i; X pack->stop = 0; X Out(pack); X CRIT_REG(printf("packet #%d sent.\n",i);) X } X X /* send the stop-packages */ X CRIT_REG(printf("sending stop-packets.\n");) X pack = (Pack *)CreateEnvelope("a packet",p_sizeof); X pack->stop = 1; X Out(pack); X X pack = (Pack *)CreateEnvelope("a packet",p_sizeof); X pack->stop = 1; X Out(pack); X X CRIT_REG(printf("waiting for process1 to terminate\n");) X DisposeEnvelope(AwaitNamedEnvelope("newprocess1")); X CRIT_REG(printf("waiting for process2 to terminate\n");) X DisposeEnvelope(AwaitNamedEnvelope("newprocess2")); X X printf("closing\n"); X CloseLibrary(OdinBase); X} X END_OF_FILE if test 3331 -ne `wc -c <'odindemo1.c'`; then echo shar: \"'odindemo1.c'\" unpacked with wrong size! fi # end of 'odindemo1.c' fi if test -f 'odinglue.asm' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'odinglue.asm'\" else echo shar: Extracting \"'odinglue.asm'\" \(4169 characters\) sed "s/^X//" >'odinglue.asm' <<'END_OF_FILE' X;odinglue.asm X;Created 4-Jul-90 by Peter Oerbaek X;Last updated 2-Sep-90 by Peter Oerbaek X;This is in the public domain. X;C-interface gluecode for odin.library V2.7 X;Assemble with 'as' for Aztec-C 3.40a or later X;Assemble with Assem/A68K for Lattice / DICE / PDC X;Assembles OK as is with A68K 2.6!!!! X X;public macro ;de-comment this for use with Assem X; XDEF \1 X; endm X X__CreateEnvelope equ -30 X__InitEnvelope equ -36 X__DisposeEnvelope equ -42 X__StartTask equ -48 X__StartProcess equ -54 X__In equ -60 X__Rd equ -66 X__Out equ -72 X__CopyOut equ -78 X__Eval equ -84 X__Inp equ -90 X__Rdp equ -96 X__AwaitNamedEnvelope equ -102 X__PollNamedEnvelope equ -108 X__OutEmptyEnvelope equ -114 X X;--- Version 2 additions X__TimedIn equ -120 X__TimedRd equ -126 X__AsyncIn equ -132 X__AsyncRd equ -138 X__AwaitTimed equ -144 X__AsyncRequest equ -150 X__UniqueName equ -156 X X public _OdinBase ;for use with Manx 'as' X; XREF _OdinBase ;for use with Assem X X_InitEnvelope: X movem.l a2/a6,-(sp) ;a6,a2,pc,env,name,len,copyfunc X move.l 12(sp),a1 X move.l 16(sp),a0 X move.l 20(sp),d0 X move.l 24(sp),a2 X move.l _OdinBase,a6 X jsr __InitEnvelope(a6) X movem.l (sp)+,a2/a6 X rts X public _InitEnvelope X X_In: X moveq.l #__In,d1 X bra.s simplecall X public _In X X_Out: X moveq.l #__Out,d1 X bra.s simplecall X public _Out X X_CopyOut: X moveq.l #__CopyOut,d1 X; bra.s simplecall X public _CopyOut X Xsimplecall: ;call with only parameter in A1 X move.l a6,-(sp) ;a6,pc,env X move.l 8(sp),a1 X move.l _OdinBase,a6 X jsr 0(a6,d1.l) X move.l (sp)+,a6 X rts X X_Rd: X moveq.l #__Rd,d1 X bra.s simplecall X public _Rd X X X_Inp: X moveq.l #__Inp,d1 X bra.s simplecall X public _Inp X X_Rdp: X moveq.l #__Rdp,d1 X bra.s simplecall X public _Rdp X X_Eval: X movem.l d2/a6,-(sp) ;a6,d2,pc,a1,d0,d1,d2 X move.l 12(sp),a1 X movem.l 16(sp),d0-d2 X move.l _OdinBase,a6 X jsr __Eval(a6) X movem.l (sp)+,d2/a6 X rts X public _Eval X X_StartTask: X move.l a6,-(sp) ;a6,pc,proc,name,pri,stack X movem.l 8(sp),a0/a1 X movem.l 16(sp),d0/d1 X move.l _OdinBase,a6 X jsr __StartTask(a6) X move.l (sp)+,a6 X rts X public _StartTask X X_StartProcess: X move.l a6,-(sp) X movem.l 8(sp),a0/a1 X movem.l 16(sp),d0/d1 X move.l _OdinBase,a6 X jsr __StartProcess(a6) X move.l (sp)+,a6 X rts X public _StartProcess X X_AwaitNamedEnvelope: X move.l a6,-(sp) X move.l 8(sp),a0 X move.l _OdinBase,a6 X jsr __AwaitNamedEnvelope(a6) X move.l (sp)+,a6 X rts X public _AwaitNamedEnvelope X X_PollNamedEnvelope: X move.l a6,-(sp) X move.l 8(sp),a0 X move.l _OdinBase,a6 X jsr __PollNamedEnvelope(a6) X move.l (sp)+,a6 X rts X public _PollNamedEnvelope X X_OutEmptyEnvelope: X move.l a6,-(sp) X move.l 8(sp),a0 X move.l _OdinBase,a6 X jsr __OutEmptyEnvelope(a6) X move.l (sp)+,a6 X rts X public _OutEmptyEnvelope X X_CreateEnvelope: X move.l a6,-(sp) ;a6,pc,name,size X move.l 8(sp),a0 X move.l 12(sp),d0 X move.l _OdinBase,a6 X jsr __CreateEnvelope(a6) X move.l (sp)+,a6 X rts X public _CreateEnvelope X X_DisposeEnvelope: X move.l a6,-(sp) X move.l 8(sp),a1 X move.l _OdinBase,a6 X jsr __DisposeEnvelope(a6) X move.l (sp)+,a6 X rts X public _DisposeEnvelope X X;--- version 2 additions X X_TimedIn: X move.l a6,-(sp) ;a6,pc,env,secs,micros X move.l 8(sp),a1 X movem.l 12(sp),d0-d1 X move.l _OdinBase,a6 X jsr __TimedIn(a6) X move.l (sp)+,a6 X rts X public _TimedIn X X_TimedRd: X move.l a6,-(sp) ;a6,pc,env,secs,micros X move.l 8(sp),a1 X movem.l 12(sp),d0-d1 X move.l _OdinBase,a6 X jsr __TimedRd(a6) X move.l (sp)+,a6 X rts X public _TimedRd X X_AsyncIn: X move.l a6,-(sp) ;a6,pc,env,port X move.l 8(sp),a1 X move.l 12(sp),a0 X move.l _OdinBase,a6 X jsr __AsyncIn(a6) X move.l (sp)+,a6 X rts X public _AsyncIn X X_AsyncRd: X move.l a6,-(sp) ;a6,pc,env,port X move.l 8(sp),a1 X move.l 12(sp),a0 X move.l _OdinBase,a6 X jsr __AsyncRd(a6) X move.l (sp)+,a6 X rts X public _AsyncRd X X_AwaitTimed: X move.l a6,-(sp) ;a6,pc,name,secs,micros X move.l 8(sp),a0 X movem.l 12(sp),d0/d1 X move.l _OdinBase,a6 X jsr __AwaitTimed(a6) X move.l (sp)+,a6 X rts X public _AwaitTimed X X_AsyncRequest: X move.l a6,-(sp) ;a6,pc,name,port X move.l 8(sp),a0 X move.l 12(sp),d0 X move.l _OdinBase,a6 X jsr __AsyncRequest(a6) X move.l (sp)+,a6 X rts X public _AsyncRequest X X_UniqueName: X move.l a6,-(sp) ;a6,pc,buffer X move.l 8(sp),a0 X move.l _OdinBase,a6 X jsr __UniqueName(a6) X move.l (sp)+,a6 X rts X public _UniqueName X X end X END_OF_FILE if test 4169 -ne `wc -c <'odinglue.asm'`; then echo shar: \"'odinglue.asm'\" unpacked with wrong size! fi # end of 'odinglue.asm' fi if test -f 'odintest.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'odintest.c'\" else echo shar: Extracting \"'odintest.c'\" \(6800 characters\) sed "s/^X//" >'odintest.c' <<'END_OF_FILE' X/*********************************************************** X* odintest.c * X* Created 12-Jul-90 by Peter Oerbaek * X* This is supposed to be a complete test-suite of the * X* functions in odin.library * X* Modified 13-Jul-90 for ANSI compatibility * X* Modified 23-Aug-90 for testing of version 2 * X************************************************************/ X X#include "exec/types.h" X#include "exec/tasks.h" X#include "exec/semaphores.h" X#include "exec/execbase.h" X#include "odin.h" X#include "stdio.h" X Xvoid *OpenLibrary(); Xstruct Task *FindTask(); Xstruct Message *GetMsg(); Xvoid WaitPort(),FreeMem(),DeletePort(); Xstruct MsgPort *CreatePort(); X Xstruct OdinBase *OdinBase; Xstruct SignalSemaphore ss; X#define CR(s) ObtainSemaphore(&ss); { s } ReleaseSemaphore(&ss); X#define debug(str) CR(printf(str);) X XEnvelope e1,e2,e3,e4; X Xstruct MsgPort *mp; Xstruct EnvMsg *msg; X XEnvelope *my_copyfunc(src,tar) XEnvelope *src,*tar; X{ X int i; X register char *a,*b; X X a = (char *)src; b = (char *)tar; X for(i = 0; i < e_sizeof; i++) { X *a++ = *b++; X } X X return tar; X} X XEnvelope *process1(e) XEnvelope *e; X{ X struct Task *tsk; X Envelope *env; X X debug("process1 started\n"); X CR(printf("lenght = %ld\n",e->e_len);) X X tsk = FindTask(NULL); X X CR(printf("stacksize = %d\n",(int)(tsk->tc_SPUpper - tsk->tc_SPLower));) X CR(printf("pri = %d\n",(int)tsk->tc_Node.ln_Pri);) X CR(printf("taskname=%s\n",tsk->tc_Node.ln_Name);) X X debug("creating envelope\n"); X env = CreateEnvelope("Env2",e_sizeof); X if(env == NULL) { debug("create returned NULL\n"); return e; } X X debug("envelope created\n"); X X Delay(100L); X debug("copyouting\n"); X CopyOut(env); X X Delay(199L); X debug("copy outing with copyfunc\n"); X env->e_copyfunc = my_copyfunc; X CopyOut(env); X X debug("normal out\n"); X Out(env); X X debug("wait for V3\n"); X while(!(env = PollNamedEnvelope("V3"))) { X debug("waiting with poll.\n"); X } X X debug("got V3 dispose\n"); X DisposeEnvelope(env); X X debug("wait for V4 and dispose\n"); X DisposeEnvelope(AwaitNamedEnvelope("V4")); X X debug("wait for task1\n"); X DisposeEnvelope(AwaitNamedEnvelope("V5")); X debug("shake hands\n"); X (void)OutEmptyEnvelope("R1"); X X (void)OutEmptyEnvelope("envelope3"); X X Delay(200L); X (void)OutEmptyEnvelope("envelope4"); X debug("2 envelopes outed\n"); X X (void)OutEmptyEnvelope("te1"); X Delay(300L); X (void)OutEmptyEnvelope("te2"); X X debug("te1 and te2 outed\n"); X X (void)AwaitTimed("never",10L,0L); X debug("awaittaimed timed out after 10 secs\n"); X X return e; X} X Xvoid task1() X{ X (void)OutEmptyEnvelope("V5"); /* shake hands with process */ X DisposeEnvelope(AwaitNamedEnvelope("R1")); X} X Xmain() X{ X Envelope *ptr; X struct Task *tsk; X char buffer[30]; X int i; X X if(!(OdinBase = (struct OdinBase *)OpenLibrary("RAM:odin.library",0L))) X { X printf("couldn't find odin.library.\n"); X exit(20); X } X X mp = CreatePort("testport",0L); X X InitSemaphore(&ss); X X debug("begin\n"); X X debug("test InitEnvelope():\n"); X ptr = InitEnvelope(&e1,"Test",e_sizeof,NoCopyFunc); X debug("init envelope finished\n"); X if(ptr == &e1) { X debug("returnvalue ok.\n"); X if(strcmp(ptr->e_name,"Test") == 0) { X debug("name inited ok\n"); X } else { X debug("name wrong\n"); X } X if(ptr->e_len == e_sizeof && ptr->e_copyfunc == NULL) { X debug("inited ok\n"); X } else { X debug("wrong init\n"); X } X } else { X debug("returned wrong value.\n"); X } X X X debug("test Eval():\n"); X e1.e_proc = process1; X (void)Eval(&e1,(long)0,(ULONG)8000,EVAL_PROCESS); X debug("eval finished\n"); X X debug("test rdp\n"); X (void)InitEnvelope(&e2,"Env2",e_sizeof,NoCopyFunc); X while(!(ptr = Rdp(&e2))) { debug("waiting in rdp\n"); } X if(ptr == &e2) { X debug("rdp returned ok\n"); X } else { X debug("rdp returned wrong\n"); X } X CR(printf("name returned by rdp: %s\n",e2.e_name);) X X debug("test rd\n"); X (void)InitEnvelope(&e2,"Env2",e_sizeof,NoCopyFunc); X ptr = Rd(&e2); X if(ptr == &e2) { X debug("rd returned ok\n"); X } else { X debug("rd returned wrong\n"); X } X CR(printf("name returned by rd: %s\n",ptr->e_name);) X X debug("test In()\n"); X (void)InitEnvelope(&e2,"Env2",e_sizeof,NoCopyFunc); X ptr = In(&e2); X if(ptr != &e2) { X debug("in returned ok\n"); X } else { X debug("in returned wrong\n"); X } X CR(printf("name returned by in: %s\n",ptr->e_name);) X DisposeEnvelope(ptr); X X debug("test AwaitNamedEnvelope()\n"); X ptr = AwaitNamedEnvelope("Env2"); X CR(printf("name returned by Await..: %s\n",ptr->e_name);) X DisposeEnvelope(ptr); X X debug("test rdp with copyfunc\n"); X (void)InitEnvelope(&e2,"Env2",e_sizeof,NoCopyFunc); X while(!(ptr = Rdp(&e2))) { debug("waiting in rdp2\n"); } X if(ptr == &e2) { X debug("rdp2 returned ok\n"); X } else { X debug("rdp2 returned wrong\n"); X } X CR(printf("name returned by rdp2: %s\n",e2.e_name);) X X debug("rd with copyfunc\n"); X (void)InitEnvelope(&e2,"Env2",e_sizeof,NoCopyFunc); X ptr = Rd(&e2); X if(ptr == &e2) { X debug("rd2 returned ok\n"); X } else { X debug("rd2 returned wrong\n"); X } X CR(printf("name returned by rd2: %s\n",e2.e_name);) X X DisposeEnvelope(AwaitNamedEnvelope("Env2")); X X Delay(100L); X Out(CreateEnvelope("V3",e_sizeof)); X X (void)OutEmptyEnvelope("V4"); X X tsk = StartTask(task1,"Task1",0L,4000L); X if(tsk == NULL) { debug("couldn't start task\n"); } X debug("task started\n"); X X /*** version 2 additions ***/ X X (void)InitEnvelope(&e3,"envelope3",e_sizeof,NoCopyFunc); X X /* wait max 5 secs */ X ptr = TimedRd(&e3,5L,0L); X if(ptr == &e3) { X debug("timedrd returned ok\n"); X CR(printf("name returned by TimedRd: %s\n",ptr->e_name);) X } else { X debug("timedrd timed out\n"); X } X X debug("ready for timedin\n"); X ptr = TimedIn(&e3,3L,0L); X if(ptr != 0L) { X debug("timedin returned ok\n"); X CR(printf("name returned by TimedIn: %s\n",ptr->e_name);) X DisposeEnvelope(ptr); X } else { X debug("timedin timed out\n"); X } X X (void)InitEnvelope(&e4,"envelope4",e_sizeof,NoCopyFunc); X AsyncIn(&e4,mp); X X debug("returned from asyncin, waiting\n"); X X WaitPort(mp); X msg = (struct EnvMsg *)GetMsg(mp); X debug("got message\n"); X DisposeEnvelope(msg->em_env); X debug("disposed of envelope\n"); X FreeMem(msg,(long)sizeof(struct EnvMsg)); X debug("freed message\n"); X X ptr = AwaitTimed("te1",1L,0L); X if(ptr != 0L) { X debug("te1 arrived\n"); X DisposeEnvelope(ptr); X } else { X debug("te1 didn't arrive in time\n"); X } X X AsyncRequest("te2",mp); X debug("waiting for te2\n"); X X WaitPort(mp); msg = (struct EnvMsg *)GetMsg(mp); X DisposeEnvelope(msg->em_env); FreeMem(msg,(long)sizeof(struct EnvMsg)); X X /* generate some unique names */ X for(i = 1; i < 200; i++) { X (void)strcpy(buffer,"prefix"); X CR(printf("%s\n",UniqueName(buffer));) X } X X debug("wait for process to die\n"); X (void)AwaitNamedEnvelope("Test"); X debug("exiting\n"); X X DeletePort(mp); X CloseLibrary(OdinBase); X} X END_OF_FILE if test 6800 -ne `wc -c <'odintest.c'`; then echo shar: \"'odintest.c'\" unpacked with wrong size! fi # end of 'odintest.c' fi if test -f 'philosophers.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'philosophers.c'\" else echo shar: Extracting \"'philosophers.c'\" \(3995 characters\) sed "s/^X//" >'philosophers.c' <<'END_OF_FILE' X/*****************************************************************/ X/* philosophers.c */ X/* demo of some of the features of odin.library 2.5 */ X/* Created 6-Jun-90 */ X/* Last modified 27-Aug-90 */ X/* Link with odinglue.o */ X/*****************************************************************/ X X#include "exec/types.h" X#include "exec/semaphores.h" X#include "stdio.h" X#include "odin.h" X Xstruct Library *OpenLibrary(); X X#define PHILONUM 4 /* number of philosophers */ X Xstruct OdinBase *OdinBase; /* the global baseptr */ X X/* structure of allocation-envelope */ Xstruct Forks { X Envelope e; X BOOL inuse[PHILONUM]; X}; X X/* argument for the philosopher processes */ Xstruct PEnv { X Envelope e; X int num; X}; X Xstruct Forks *the_forks; Xstruct SignalSemaphore xx; X X/* protect C-functions that are not re-entrant */ X#define CR(s) ObtainSemaphore(&xx); { s } ReleaseSemaphore(&xx); X#define USE(n) (copy_forks->inuse[n])?printf("%d ",n):printf(" ") X Xchar s[PHILONUM][20]; /* holds the names */ X X/* make name with single-digit suffix */ Xchar *philoname(str,name,num) Xchar *str,*name; Xint num; X{ X register char *s2; X X s2 = str; X while(*name) *s2++ = *name++; X *s2++ = num + '0'; X *s2 = 0; X return str; X} X X/* the body of the new processes, must be re-entrant */ Xstruct PEnv *philosopher(env) Xstruct PEnv *env; X{ X int i,me; X struct Forks *f; X FILE *win; X X me = env->num; X X /* open monitorwindow */ X switch(me) { X case 0: CR(win = fopen("CON:10/10/200/80/Philo0","w");) X break; X case 1: CR(win = fopen("CON:220/10/200/80/Philo1","w");) X break; X case 2: CR(win = fopen("CON:10/115/200/80/Philo2","w");) X break; X case 3: CR(win = fopen("CON:220/115/200/80/Philo3","w");) X break; X default: X break; X } X X /* let each philosopher eat 20 times */ X for(i = 0; i < 20; i++) { X f = (struct Forks *)AwaitNamedEnvelope("Forkalloc"); X while (f->inuse[me] || f->inuse[(me+1) % PHILONUM]) { X Out(f); X f = (struct Forks *)AwaitNamedEnvelope("Forkalloc"); X } X X /* no one used the forks, now sit on them */ X f->inuse[me] = TRUE; X f->inuse[(me+1) % PHILONUM] = TRUE; X X /* allow others to look at me eating */ X Out(f); X X /* eat */ X CR(fprintf(win,"philosopher #%d eating\n",me);) X X /* release the forks */ X f = (struct Forks *)AwaitNamedEnvelope("Forkalloc"); X f->inuse[me] = FALSE; X f->inuse[(me+1) % PHILONUM] = FALSE; X Out(f); X } X CR(fclose(win);) X return(env); X} X Xmain() X{ X int i; X struct PEnv *env; X struct Forks *copy_forks; X X /* set up semaphore to protect C library routines that are */ X /* not re-entrant */ X X InitSemaphore(&xx); X X /* open odin.library */ X OdinBase = (struct OdinBase *)OpenLibrary("RAM:odin.library",0L); X if(OdinBase == NULL) { X printf("Error: Couldn't open odin.library\n"); X exit(10); X } X X /* now create a few philosopher-processes */ X for(i = 0; i < PHILONUM; i++) { X env = (struct PEnv *)CreateEnvelope( X philoname(&s[i][0],"phil#",i), X (ULONG)sizeof(struct PEnv)); X env->e.e_proc = philosopher; X env->num = i; X (void)Eval(env,0L,8000L,EVAL_PROCESS); X } X X /* init the allocation envelope */ X the_forks = (struct Forks *)CreateEnvelope("Forkalloc", X (ULONG)sizeof(struct Forks)); X X for(i = 0; i < PHILONUM; i++) the_forks->inuse[i] = FALSE; X X Out(the_forks); X X copy_forks = (struct Forks *)CreateEnvelope("Forkalloc", X (ULONG)sizeof(struct Forks)); X while((env = (struct PEnv *)PollNamedEnvelope(&s[0][0])) == NULL) { X Rd(copy_forks); X CR( printf("Forks in use: "); X USE(0); X USE(1); X USE(2); X USE(3); X printf("\n"); X ) X } X X DisposeEnvelope(copy_forks); X DisposeEnvelope(env); X X /* now wait for other philosophers to die */ X for(i = 1; i < PHILONUM; i++) { X DisposeEnvelope(AwaitNamedEnvelope(&s[i][0])); X } X X /* get rid of allocation-envelope, wait at most 10 secs */ X DisposeEnvelope(AwaitTimed("Forkalloc",10L,0L)); X CloseLibrary(OdinBase); X} END_OF_FILE if test 3995 -ne `wc -c <'philosophers.c'`; then echo shar: \"'philosophers.c'\" unpacked with wrong size! fi # end of 'philosophers.c' fi if test -f 'readme.uu' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'readme.uu'\" else echo shar: Extracting \"'readme.uu'\" \(4849 characters\) sed "s/^X//" >'readme.uu' <<'END_OF_FILE' Xbegin 666 readme XM4D5!1$U%(&9O<B!O9&EN+FQI8G)A<GD@5C(N-RP@.2U397`M.3`L(%)E;&5AT XM<V4@,@H*05542$]2.B!0971E<B#8<F+F:RX*0T]065))1TA4.B!0971E<B#8+ XM<F+F:R`Q.3DP+"!!;&P@<FEG:'1S(')E<V5R=F5D+@H*55!$051%(&9O<B!2, XM96QE87-E(#(N"@H@("!!(&9E=R!B=6=S(&EN(%)E;&5A<V4@,2!H87,@8F5EH XM;B!F:7AE9"P@86YD('-E=F5N(&YE=R!F=6YC=&EO;G,@87)E(&%D9&5D"G1O8 XM('-U<'!O<G0@=V%I=&EN9R!F;W(@96YV96QO<&5S('=I=&@@82!T:6UE;W5TL XM+"!A;F0@9F]R('!U='1I;F<@96YV96QO<&5S"G1O(&UE<W-A9V4M<&]R=',N' XM"B`@(%1W;R!F=6YC=&EO;G,@*&YA;65L>2!#;W!Y3W5T*"D@86YD($]U=$5M, XM<'1Y16YV96QO<&4H*2D@:&%V92!C:&%N9V5D"G)E='5R;G1Y<&4L('-O(&ET: XM)W,@;F]W('!O<W-I8FQE('1O(&-H96-K(&9O<B!M96UO<GD@86QL;V-A=&EOH XM;B!F86EL=7)E+@H*("`@5&AE(&5X86UP;&5S(&AA=F4@8F5E;B!E>'1E;F1E# XM9"!W:71H('!H:6QO<V]P:&5R<RYC+"!T:&4@9F%M;W5S(&1I;FEN9PIP:&EL9 XM;W-O<&AE<G,@<')O9W)A;2!S=6=G97-T960@8GD@1&EJ:W-T<F$L(&%N9"!WC XM:71H(&1R87<N8R!A('!R;V=R86T*=&AA="!D>6YA;6EC86QL>2!C86X@8W)E; XM871E(&]R(&1E<W1R;WD@=&%S:W,@9F]R(&AA;F1L:6YG($E$0TU0(&UE<W-A] XM9V5S"F%N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YT97)F86-E('=I=&@@@ XM0R!C;VUP:6QE<G,N"B`@("`@("`@("`@("`@($%S<V5M8FQE<R!/2R!U;F1EN XM<B!!>G1E8R`G87,G(&%N9"!!-CA+(#(N-@H@("`@("`@("`@("`@("!!<W-ED XM;6)L92!W:71H($$V.$L@9F]R('5S92!W:71H($QA='1I8V4@86YD($)L:6YK/ XM"@IO9&EN+F@@("`@("`@("!#(&AE861E<B!W:71H(&9U;F-T:6]N('!R;W1OV XM='EP97,@9F]R($%Z=&5C(&%N9"!!3E-)('-T=69F"@IO9&EN+FD@("`@("`@. XM("!);F-L=61E9FEL92!F;W(@07-S96TO038X2PH*36%K969I;&4@("`@("`@? XM1F]R(&=E;F5R871I;F<@=&AE(&5X86UP;&5S('=I=&@@07IT96,@0R`S+C0P& XM02!O<B!L871E<@H@("`@("`@("`@("`@("!&;W(@9V5N97)A=&EN9R!A;&P@( XM97AA;7!L97,@<V%Y.B!M86ME(&%L;`H**BHJ($Y"+B!T:&4@97AA;7!L97,@- XM8F5L;W<@97AP96-T(&]D:6XN;&EB<F%R>2!T;R!B92!I;B!204TZ("HJ*@H*\ XM;V1I;G1E<W0N8R`@("`@5&5S="!O9B!A;&P@9G5N8W1I;VYS(&EN(&]D:6XNQ XM;&EB<F%R>0H*;V1I;F1E;6\Q+F,@("`@4VEM<&QE(&1E;6\*"F1R87<N8R`@< XM("`@("`@($AA;F1L97,@;75L=&EP;&4@=VEN9&]W<R!A;F0@=&%S:W,@=7-I@ XM;F<@;V1I;BYL:6)R87)Y"@IP:&EL;W-O<&AE<G,N8R!4:&4@9&EN:6YG('!H9 XM:6QO<V]P:&5R<RX*"G1A<VMS+F,@("`@("`@(%5T:6QI='DL(&EN9&5P96YD( XM96YT(&]F(&]D:6XN;&EB<F%R>2!T:&%T(&QI<W1S('1A<VMS"@H@("!1=65SA XM=&EO;G,L(&)U9R!R97!O<G1S+"!C;VUM96YT<R!E=&,N('-H;W5L9"!B92!E] XM+6UA:6QE9"!T;R!M92!A="!T:&4@"F%D9')E<W,@8F5L;W<N($5N:F]Y+@H*" XM4%,N($D@=V]U;&0@;&EK92!T;R!K;F]W(&EF('1H:7,@=V]R:W,@8V]R<F5CG XM=&QY(&]N('1H92!!,S`P,"P@<V\@<&QE87-E"B`@("!R97!O<G0@:68@>6]UU XM(&%R92!S;R!L=6-K>2!T;R!H879E(&]N92X*"@I);G1E<FYE=#H@<&]E0&1A# XM:6UI+F%A=2YD:R`@("`@("`\/#PM+2TM+2!.;W1E('1H92!C:&%N9V4A"B`@> XM("`@("`@("!P;V5`9&%I;6DN9&L@("`@("`@("`@("AO;&0@861D<F5S<RD*% XM555#4#H@("`@("XN+B%U=6YE="%M8W-U;B%S=6YI8R%D:W5U9R%D86EM:2%PT XM;V4*"E--86EL.B`@(%!E=&5R(-AR8N9K"B`@("`@("`@($AA<VQE(%)I;F=VR XM96H@,3(R"B`@("`@("`@($1++3@R,#`@06%R:'5S($XN"B`@("`@("`@($1EG X2;FUA<FL*"B`@+2!0971E<BX*R X`` Xend Xsize 3438 END_OF_FILE if test 4849 -ne `wc -c <'readme.uu'`; then echo shar: \"'readme.uu'\" unpacked with wrong size! fi # end of 'readme.uu' fi if test -f 'tasks.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'tasks.c'\" else echo shar: Extracting \"'tasks.c'\" \(1477 characters\) sed "s/^X//" >'tasks.c' <<'END_OF_FILE' X/**************************************************************** X* tasks.c Version 1.0 X* Created 25-aug-90 X* Lists tasks/processes currently running X****************************************************************/ X X#include "exec/types.h" X#include "exec/execbase.h" X#include "stdio.h" X Xstruct MyMem { X char name[80]; X int pri; X ULONG addr; X}; X Xstruct MyMem mem[80]; /* holds max 80 tasks */ X Xextern struct ExecBase *SysBase; X Xvoid main() X{ X struct Task *ptr; X int numtasks; X UWORD *tmp; X ULONG *tmp2; X X numtasks = 0; X X printf("Pri\tTask\tName\n"); X X Forbid(); X ptr = (struct Task *)(SysBase->TaskReady.lh_Head); X while(ptr->tc_Node.ln_Succ != NULL) { X mem[numtasks].pri = (int)ptr->tc_Node.ln_Pri; X mem[numtasks].addr = (ULONG)ptr; X X if(ptr->tc_Node.ln_Name != NULL) { X strcpy(mem[numtasks].name,ptr->tc_Node.ln_Name); X } else { X strcpy(mem[numtasks].name,"<anonymous>"); X } X numtasks++; X ptr = (struct Task *)ptr->tc_Node.ln_Succ; X } X ptr = (struct Task *)(SysBase->TaskWait.lh_Head); X while(ptr->tc_Node.ln_Succ != NULL) { X mem[numtasks].pri = (int)ptr->tc_Node.ln_Pri; X mem[numtasks].addr = (ULONG)ptr; X X if(ptr->tc_Node.ln_Name != NULL) { X strcpy(mem[numtasks].name,ptr->tc_Node.ln_Name); X } else { X strcpy(mem[numtasks].name,"<anonymous>"); X } X numtasks++; X ptr = (struct Task *)ptr->tc_Node.ln_Succ; X } X Permit(); X X while(--numtasks >= 0) { X printf("%3d",mem[numtasks].pri); X printf("\t%6lx\t%s\n",mem[numtasks].addr,mem[numtasks].name); X } X} X END_OF_FILE if test 1477 -ne `wc -c <'tasks.c'`; then echo shar: \"'tasks.c'\" unpacked with wrong size! fi # end of 'tasks.c' fi echo shar: End of archive 1 \(of 2\). cp /dev/null ark1isdone MISSING="" for I in 1 2 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked both archives. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 -- Mail submissions (sources or binaries) to <amiga@uunet.uu.net>. Mail comments to the moderator at <amiga-request@uunet.uu.net>. Post requests for sources, and general discussion to comp.sys.amiga.