Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-1821

Use beginthreadex, and ensure we use the correct C calling conventions in all callbacks

    • Type: Icon: Task Task
    • Resolution: Done
    • WT2.6.0
    • Affects Version/s: None
    • Component/s: None
    • None

      Fixes WT-1791

      There are a few changes:
      1. Use beginthreadex to allocate CRT TLS structures at thread creation instead of deferring their allocation. This is also better for Managed C++.
      2. Ensure all APIs use *stdcall and *cdecl as appropriate. By default under x64 MSVC this does not make a difference since *stdcall == *cdecl unlike on x86.
      3. Add a build variant to MCI system that ensures we use the correct calling conventions everywhere by forcing the default calling convention to __vectorcall. This ensures any missing calling convention annotations are build failures.

      Note: I cannot compile the tests, and python wrapper with the stronger warnings so I only verify calling convention compatibility against wiredtiger itself.

      Tests:
      Windows with and without /Gv

            Assignee:
            Unassigned Unassigned
            Reporter:
            mark.benvenuto@mongodb.com Mark Benvenuto
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: