home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / hp / 9806 < prev    next >
Encoding:
Text File  |  1992-08-29  |  2.4 KB  |  85 lines

  1. Newsgroups: comp.sys.hp
  2. Path: sparky!uunet!mcsun!news.funet.fi!cc.tut.fi!tut!hannu
  3. From: hannu@ae.tut.fi (Hannu Koivisto)
  4. Subject: datalock() system call bug in HP9000/300
  5. Message-ID: <HANNU.92Aug28144211@ae.ae.tut.fi>
  6. Sender: news@cc.tut.fi (USENET News System)
  7. Organization: Tampere Univ. of Technology, Finland.
  8. Distribution: comp
  9. Date: 28 Aug 92 14:42:11
  10. Lines: 72
  11.  
  12.  
  13.  
  14. There seems to be some problems with real-time system calls with
  15. HP9000/300 series workstations. The appended simple program tries
  16. to lock itself into the memory using datalock() call. 
  17.  
  18. Results: 
  19. 9000/43T system crash (HP-UX  B.08.00 A 9000/43T ) (i.e upgraded to 68040)
  20. 9000/340 system crash (HP-UX  B.08.00 A 9000/340 )
  21. 9000/720           OK (HP-UX  A.08.07 A 9000/720 )
  22.  
  23. The locking using plock() system call works on both platfroms.
  24. Have anybody notice this or any other real-time specific  problems? 
  25. Can this be fixed ?
  26.  
  27.  
  28. ------------------------------------------------------------------------
  29. Hannu Koivisto                      Tampere University of Technology,
  30. hannu@ae.tut.fi                   Control Engineering Laboratory
  31.                           P.O. Box 692, 33101 Tampere, FINLAND
  32.                           Telefax + 358 31 162340
  33. ------------------------------------------------------------------------
  34.  
  35.  
  36.  /* ----------- test.c   -------------------------    */
  37.  /* note: you should have RTPRIO and MLOCK privileges */
  38.  /* to run this program. compile: cc test.c -o test   */
  39.  
  40.  #include <sys/lock.h>
  41.  #include <sys/rtprio.h>
  42.  
  43.  #define MAINERR 1
  44.  #define RTPRIOVAL 50
  45.  
  46.  #define HALFMEGA 524288
  47.  #define ONEMEGA 1048576
  48.  
  49.  main(argc,argv)
  50.  int argc;
  51.  char *argv[];
  52.  {
  53.        int c[10000];
  54.        int i;
  55.        int a;
  56.  
  57.        if((i=rtprio(0,RTPRIOVAL))==-1){
  58.          perror("rtprio failed\n");
  59.          exit(MAINERR);
  60.        }
  61.        printf("rtprio OK= %d \n",i);
  62.  
  63.  
  64.        if((i=datalock(ONEMEGA,HALFMEGA))==-1){
  65.          perror("datalock failed\n");
  66.          exit(MAINERR);
  67.        }
  68.        printf("datalock= %d \n",i);
  69.  
  70.  
  71.  
  72.        printf("Succes - give letter: ");
  73.        scanf("%d",&a);
  74.       printf("a= %d \n",a);
  75.  
  76.  }
  77.  
  78. --
  79. ------------------------------------------------------------------------
  80. Hannu Koivisto                      Tampere University of Technology,
  81. hannu@ae.tut.fi                   Control Engineering Laboratory
  82.                           P.O. Box 692, 33101 Tampere, FINLAND
  83.                           Telefax + 358 31 162340
  84. ------------------------------------------------------------------------
  85.