Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove boost thread_specific_ptr #4221

Merged
merged 16 commits into from
Apr 14, 2024

Commits on Apr 10, 2024

  1. Replace m_errormessage fields with a thread_local hash map instead to…

    … reduce the dependency on the boost thread library
    
    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    534dfa7 View commit details
    Browse the repository at this point in the history
  2. Replace use of boost::thread_specific_ptr for the per thread info use…

    …d inside ImageCacheImpl with a simpler idiom using a thread_local map
    
    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    17a1d2f View commit details
    Browse the repository at this point in the history
  3. Remove boost::thread and boost:filesystem from CMakeLists.txt as they…

    … are no longer used
    
    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    5aa4023 View commit details
    Browse the repository at this point in the history
  4. Fix unity build errors by making the static variable names unique

    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    661b178 View commit details
    Browse the repository at this point in the history
  5. Add shrink_to_fit when clearing error messages to minimize wasted memory

    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 10, 2024
    Configuration menu
    Copy the full SHA
    6815efb View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. Fix crashes in unit test that repeatedly created ImageCache objects. …

    …This could lead to the same pointer being re-used and getting stale data from the previous cache's per thread info structs. Instead of looking up by pointer, lookup by an atomic id that is never re-used. Also remove the shared flag because it was always set to true. Either the thread owns the per thread info (in the case of automatic creation) or the caller down (manual creation). Both cases were being flagged as shared, so the non-shared codepath was never taken
    
    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    cb86c35 View commit details
    Browse the repository at this point in the history
  2. Simplify the perthread_info memory management by making the imagecach…

    …e itself own (and free) the memory of all per thread info structs, regardless of if they are created implicitly or explicitly.
    
    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    6554173 View commit details
    Browse the repository at this point in the history
  3. Run clang-format

    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    d66fb64 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2024

  1. Erase error message entries instead of just clearing the string

    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    bab0860 View commit details
    Browse the repository at this point in the history
  2. Erase any dangling error messages when objects that report errors are…

    … destroyed.
    
    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    d7e1afe View commit details
    Browse the repository at this point in the history
  3. Run clang-format

    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    5bc1265 View commit details
    Browse the repository at this point in the history
  4. Tweak erase call

    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    ab60908 View commit details
    Browse the repository at this point in the history
  5. Revert "Erase any dangling error messages when objects that report er…

    …rors are destroyed."
    
    This reverts commit d7e1afe.
    
    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 12, 2024
    Configuration menu
    Copy the full SHA
    fd2db6e View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2024

  1. Add calls in ImageInput/Output to clear error string, but leave the I…

    …mageCache and TextureSystem alone as they are less likely to accumulate cruft and also to avoid the static destruction order fiasco
    
    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 14, 2024
    Configuration menu
    Copy the full SHA
    ac5752c View commit details
    Browse the repository at this point in the history
  2. Revert "Add calls in ImageInput/Output to clear error string, but lea…

    …ve the ImageCache and TextureSystem alone as they are less likely to accumulate cruft and also to avoid the static destruction order fiasco"
    
    This reverts commit ac5752c.
    
    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 14, 2024
    Configuration menu
    Copy the full SHA
    da93004 View commit details
    Browse the repository at this point in the history
  3. Leave the erase calls in the destructors, but commented out until we …

    …can sort out the static destruction order fiasco
    
    Signed-off-by: Chris Kulla <ckulla@gmail.com>
    fpsunflower committed Apr 14, 2024
    Configuration menu
    Copy the full SHA
    00b8168 View commit details
    Browse the repository at this point in the history