(porting) sysMonitorInUse definition is wrong

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.2.0
    • Affects Version/s: 1.2.0
    • Component/s: 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)

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

            Assignee:
            Hong Zhang
            Reporter:
            Mick Fleming
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: