chromium/third_party/grpc/src/src/core/lib/gprpp/posix/thd.cc

//
//
// Copyright 2015 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//

// Posix implementation for gpr threads.

#include <grpc/support/port_platform.h>

#include <string>

#include <grpc/support/time.h>

#ifdef GPR_POSIX_SYNC

#include <pthread.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include <grpc/support/thd_id.h>

#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/fork.h"
#include "src/core/lib/gprpp/strerror.h"
#include "src/core/lib/gprpp/thd.h"

namespace grpc_core {
namespace {
class ThreadInternalsPosix;

struct thd_arg {};

size_t RoundUpToPageSize(size_t size) {}

// Returns the minimum valid stack size that can be passed to
// pthread_attr_setstacksize.
size_t MinValidStackSize(size_t request_size) {}

class ThreadInternalsPosix : public internal::ThreadInternalsInterface {};

}  // namespace

Thread::Thread(const char* thd_name, void (*thd_body)(void* arg), void* arg,
               bool* success, const Options& options)
    :{}
}  // namespace grpc_core

// The following is in the external namespace as it is exposed as C89 API
gpr_thd_id gpr_thd_currentid(void) {}

#endif  // GPR_POSIX_SYNC