Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4123382

(porting) sysMonitorInUse definition is wrong

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.2.0
    • 1.2.0
    • hotspot
    • 1.2fcs
    • x86
    • windows_95
    • Not verified



      Name: mf23781 Date: 03/27/98


      1.2 Beta3K

      bool_t is not necessarily an int

      An enum can be a (signed/unsigned/none) char, (signed/unsigned) short
      or (signed) int.

      sysMonitorInUse()
      in src/share/javavm/include/sys_api.h
      it is declared as returning bool_t

      bool_t sysMonitorInUse(sys_mon_t *);

      in src/win32/hpi/src/monitor_md.c
      it is defined as returning an int


      /*
       * Return true if there are any threads inside this monitor.
       */
      int
      sysMonitorInUse(sys_mon_t *mid)


      If bool_t is implemented by the compile as a char, this fails to compile.

      Fix: Change the definition in
      src/win32/hpi/src/monitor_md.c
      to
      /*
       * Return true if there are any threads inside this monitor.
       */
      bool_t
      sysMonitorInUse(sys_mon_t *mid)

      ======================================================================

            hongzh Hong Zhang
            miflemi Mick Fleming
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: