<commit_before>//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information. 
//


/*++



Module Name:

    threadsusp.cpp

Abstract:

    Implementation of functions related to threads.

Revision History:



--*/

#include "pal/corunix.hpp"
#include "pal/thread.hpp"
#include "pal/mutex.hpp"
#include "pal/seh.hpp"
#include "pal/init.h"
#include "pal/dbgmsg.h"

#include <pthread.h>
#if !USE_SIGNALS_FOR_THREAD_SUSPENSION
#if (HAVE_PTHREAD_SUSPEND || HAVE_PTHREAD_SUSPEND_NP) && (HAVE_PTHREAD_RESUME || HAVE_PTHREAD_RESUME_NP || HAVE_PTHREAD_CONTINUE || HAVE_PTHREAD_CONTINUE_NP)
#if HAVE_PTHREAD_NP_H
#include <pthread_np.h>
#endif
#elif HAVE_MACH_THREADS
#include <mach/thread_act.h>
#include "sys/types.h"
#include "sys/mman.h"
#else
#error "Don't know how to suspend and resume threads on this platform!"
#endif
#endif // !USE_SIGNALS_FOR_THREAD_SUSPENSION
#include <unistd.h>
#include <errno.h>
#include <stddef.h>
#include <sys/stat.h>
#include <limits.h>
#include <debugmacrosext.h>

#if defined(_AIX)
// AIX requires explicit definition of the union semun (see semctl man page)
union semun 
{
    int val;
    struct semid_ds * buf;
    unsigned short * array;
};
#endif 

using namespace CorUnix;

/* ------------------- Definitions ------------------------------*/
SET_DEFAULT_DEBUG_CHANNEL(THREAD);

/* This code is written to the blocking pipe of a thread that was created
   in suspended state in order to resume it. */
CONST BYTE WAKEUPCODE=0x2A;<commit_msg>Remove unneeded includes and error in threadsusp.cpp<commit_after>//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information. 
//


/*++



Module Name:

    threadsusp.cpp

Abstract:

    Implementation of functions related to threads.

Revision History:



--*/

#include "pal/corunix.hpp"
#include "pal/thread.hpp"
#include "pal/mutex.hpp"
#include "pal/seh.hpp"
#include "pal/init.h"
#include "pal/dbgmsg.h"

#include <pthread.h>
#include <unistd.h>
#include <errno.h>
#include <stddef.h>
#include <sys/stat.h>
#include <limits.h>
#include <debugmacrosext.h>

#if defined(_AIX)
// AIX requires explicit definition of the union semun (see semctl man page)
union semun 
{
    int val;
    struct semid_ds * buf;
    unsigned short * array;
};
#endif 

using namespace CorUnix;

/* ------------------- Definitions ------------------------------*/
SET_DEFAULT_DEBUG_CHANNEL(THREAD);

/* This code is written to the blocking pipe of a thread that was created
   in suspended state in order to resume it. */
CONST BYTE WAKEUPCODE=0x2A;
{'fraction_non_alphanumeric': 0.14444857036761977, 'fraction_numerical': 0.0014853323431117712, 'mean_word_length': 3.512562814070352, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7639229', 'n_tokens_mistral': 921, 'n_tokens_neox': 898, 'n_words': 275}