This file is indexed.

/usr/include/wx-3.0/wx/unix/tls.h is in wx3.0-headers 3.0.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
///////////////////////////////////////////////////////////////////////////////
// Name:        wx/unix/tls.h
// Purpose:     Pthreads implementation of wxTlsValue<>
// Author:      Vadim Zeitlin
// Created:     2008-08-08
// Copyright:   (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence:     wxWindows licence
///////////////////////////////////////////////////////////////////////////////

#ifndef _WX_UNIX_TLS_H_
#define _WX_UNIX_TLS_H_

#include <pthread.h>

// ----------------------------------------------------------------------------
// wxTlsKey is a helper class encapsulating the TLS value index
// ----------------------------------------------------------------------------

class wxTlsKey
{
public:
    // ctor allocates a new key and possibly registering a destructor function
    // for it
    wxTlsKey(wxTlsDestructorFunction destructor)
    {
        m_destructor = destructor;
        if ( pthread_key_create(&m_key, destructor) != 0 )
            m_key = 0;
    }

    // return true if the key was successfully allocated
    bool IsOk() const { return m_key != 0; }

    // get the key value, there is no error return
    void *Get() const
    {
        return pthread_getspecific(m_key);
    }

    // change the key value, return true if ok
    bool Set(void *value)
    {
        void *old = Get();
        if ( old )
            m_destructor(old);

        return pthread_setspecific(m_key, value) == 0;
    }

    // free the key
    ~wxTlsKey()
    {
        if ( IsOk() )
            pthread_key_delete(m_key);
    }

private:
    wxTlsDestructorFunction m_destructor;
    pthread_key_t m_key;

    wxDECLARE_NO_COPY_CLASS(wxTlsKey);
};

#endif // _WX_UNIX_TLS_H_