home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.hp
- Path: sparky!uunet!mcsun!news.funet.fi!cc.tut.fi!tut!hannu
- From: hannu@ae.tut.fi (Hannu Koivisto)
- Subject: datalock() system call bug in HP9000/300
- Message-ID: <HANNU.92Aug28144211@ae.ae.tut.fi>
- Sender: news@cc.tut.fi (USENET News System)
- Organization: Tampere Univ. of Technology, Finland.
- Distribution: comp
- Date: 28 Aug 92 14:42:11
- Lines: 72
-
-
-
- There seems to be some problems with real-time system calls with
- HP9000/300 series workstations. The appended simple program tries
- to lock itself into the memory using datalock() call.
-
- Results:
- 9000/43T system crash (HP-UX B.08.00 A 9000/43T ) (i.e upgraded to 68040)
- 9000/340 system crash (HP-UX B.08.00 A 9000/340 )
- 9000/720 OK (HP-UX A.08.07 A 9000/720 )
-
- The locking using plock() system call works on both platfroms.
- Have anybody notice this or any other real-time specific problems?
- Can this be fixed ?
-
-
- ------------------------------------------------------------------------
- Hannu Koivisto Tampere University of Technology,
- hannu@ae.tut.fi Control Engineering Laboratory
- P.O. Box 692, 33101 Tampere, FINLAND
- Telefax + 358 31 162340
- ------------------------------------------------------------------------
-
-
- /* ----------- test.c ------------------------- */
- /* note: you should have RTPRIO and MLOCK privileges */
- /* to run this program. compile: cc test.c -o test */
-
- #include <sys/lock.h>
- #include <sys/rtprio.h>
-
- #define MAINERR 1
- #define RTPRIOVAL 50
-
- #define HALFMEGA 524288
- #define ONEMEGA 1048576
-
- main(argc,argv)
- int argc;
- char *argv[];
- {
- int c[10000];
- int i;
- int a;
-
- if((i=rtprio(0,RTPRIOVAL))==-1){
- perror("rtprio failed\n");
- exit(MAINERR);
- }
- printf("rtprio OK= %d \n",i);
-
-
- if((i=datalock(ONEMEGA,HALFMEGA))==-1){
- perror("datalock failed\n");
- exit(MAINERR);
- }
- printf("datalock= %d \n",i);
-
-
-
- printf("Succes - give letter: ");
- scanf("%d",&a);
- printf("a= %d \n",a);
-
- }
-
- --
- ------------------------------------------------------------------------
- Hannu Koivisto Tampere University of Technology,
- hannu@ae.tut.fi Control Engineering Laboratory
- P.O. Box 692, 33101 Tampere, FINLAND
- Telefax + 358 31 162340
- ------------------------------------------------------------------------
-