<commit_before>/*
 * Copyright (c) 2014 Red Hat.
 * 
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 * License for more details.
 */
#include "pmapi.h"
#include "impl.h"
#include "internal.h"
#include "probe.h"

#if defined(IS_SOLARIS) && !defined(PTHREAD_STACK_MIN)
#define PTHREAD_STACK_MIN       ((size_t)_sysconf(_SC_THREAD_STACK_MIN))
#endif

/*
 * Service discovery by active probing. The given subnet is probed for the
 * requested service(s).
 */
typedef struct connectionOptions {
    __pmSockAddr	*netAddress;	/* Address of the subnet */
    int			maskBits;	/* Number of bits in the subnet */
    unsigned		maxThreads;	/* Max number of threads to use. */
    struct timeval	timeout;	/* Connection timeout */
    unsigned		*discoveryFlags;/* Discovery API flags */
} connectionOptions;

/* Context for each thread. */
typedef struct connectionContext {
    const char			*service;	/* Service spec */
    __pmSockAddr		*nextAddress;	/* Next available address */
    int				maskBits;	/* Mask bits for the network address */
    int				nports;		/* Number of ports per address */
    int				portIx;		/* Index of next available port */
    const int			*ports;		/* The actual ports */
    const struct timeval 	*timeout;	/* Connection timeout */
    int				*numUrls;	/* Size of the results */
    char			***urls;	/* The results */
    unsigned			*discoveryFlags;/* Discovery API flags */
#if PM_MULTI_THREAD
    __pmMutex		addrLock;	/* lock for the above address/port */
    __pmMutex		urlLock;	/* lock for the above results */
#endif<commit_msg>Resolve pthread stack size build issue on GNU/Hurd platform<commit_after>/*
 * Copyright (c) 2014 Red Hat.
 * 
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 * License for more details.
 */
#include "pmapi.h"
#include "impl.h"
#include "internal.h"
#include "probe.h"

#if !defined(PTHREAD_STACK_MIN)
#if defined(IS_SOLARIS)
#define PTHREAD_STACK_MIN       ((size_t)_sysconf(_SC_THREAD_STACK_MIN))
#else
#define PTHREAD_STACK_MIN       16384
#endif
#endif

/*
 * Service discovery by active probing. The given subnet is probed for the
 * requested service(s).
 */
typedef struct connectionOptions {
    __pmSockAddr	*netAddress;	/* Address of the subnet */
    int			maskBits;	/* Number of bits in the subnet */
    unsigned		maxThreads;	/* Max number of threads to use. */
    struct timeval	timeout;	/* Connection timeout */
    unsigned		*discoveryFlags;/* Discovery API flags */
} connectionOptions;

/* Context for each thread. */
typedef struct connectionContext {
    const char			*service;	/* Service spec */
    __pmSockAddr		*nextAddress;	/* Next available address */
    int				maskBits;	/* Mask bits for the network address */
    int				nports;		/* Number of ports per address */
    int				portIx;		/* Index of next available port */
    const int			*ports;		/* The actual ports */
    const struct timeval 	*timeout;	/* Connection timeout */
    int				*numUrls;	/* Size of the results */
    char			***urls;	/* The results */
    unsigned			*discoveryFlags;/* Discovery API flags */
#if PM_MULTI_THREAD
    __pmMutex		addrLock;	/* lock for the above address/port */
    __pmMutex		urlLock;	/* lock for the above results */
#endif
{'fraction_non_alphanumeric': 0.09097596861206474, 'fraction_numerical': 0.004168710152035311, 'mean_word_length': 3.2533889468196038, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4589178', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1184, 'n_words': 483}