HP3000-L Archives

July 2013, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Keven Miller (3k)" <[log in to unmask]>
Reply To:
Keven Miller (3k)
Date:
Thu, 18 Jul 2013 15:49:43 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (71 lines)
Long ago I looked at the libbsd contribution,
and was sad that it didn't come with the sources.
Just  include  files.


So, with Ron's request, I started playing with it.
So, here are some details of my testing....


1. extracted the OIO module from libbsd.a (NMRL),
   which contains tread,twrite.
   (Had to manipulate the libbsd.a file some, in order to access it)

2. create this C test program
/*----------------------------------------------------------------*/
#pragma intrinsic FOPEN
#pragma intrinsic FCLOSE
proc int main ()
{
    int R, n;
    short f;
    char buf [40];

    f = FOPEN ( "TTY", 0644, 00004 ); /* cctl,und,stdin,ascii r/w */
    printf ("tread 5>");
    fflush (stdout);

    memset (buf, '*', 10);
    buf [10] = 0;
    R = tread (f, buf, 5);
    printf ("tr %d [%s]\n", R, buf);

    n = sprintf (buf, "-twrite-");
    R = twrite (f, buf, n);
    printf ("tw %d\n", R);

    R = tread (f, buf, 0);
    printf ("Done\n");
    FCLOSE ( f, 0, 0 );
    return 0;
}
/*----------------------------------------------------------------*/
Appears to run ok.
    tread acts like a binary read. It must read the count chars. ie, 5 in my 
code.
        return does not terminate the read.
    tread returns the number of chars read. uses an MPE file number.
    twrite returns the number of chars written.

    Next I need to test as 2 processes or 2 threads to have them both 
active.

The problem however, is it leaves the terminal in some odd state.
Once the program ends, I get the CI prompt. But when hit return,
it appears to be hung. It can receive TELLs.
If from another session, I do abortio on its stdlist device, it shows 
SOFTWARE ABORT,
get the CI prompt. But hung again.
After aborting the session, (reflection nsvt), I can log back in and have a 
normal tty.

Oh, program requires PM.  Underneath tread/twrite, it calls sendio and
rendezvousio.
I did try FOPEN with nowait-io set.
tread didn't read (no echo of chars) and could not complete the read.

Keven Miller

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2