Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-24308

os_thread_get_curr_id() et al. introduce unnecessary function call overhead

    XMLWordPrintable

    Details

      Description

      The os0thread.cc module unnecessarily defines non-inlined function call wrappers for trivial operations.

      os_thread_pf() simply casts the argument to a different type, and it should not exist at all.

      The functions os_thread_eq(), os_thread_yield(), os_thread_get_curr_id() are better defined as macros that refer to the Microsoft Windows and POSIX interfaces.

      Because os_thread_get_curr_id() is being invoked in locking code, this simplification could slightly improve performance.

        Attachments

          Activity

            People

            Assignee:
            marko Marko Mäkelä
            Reporter:
            marko Marko Mäkelä
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration