aboutsummaryrefslogtreecommitdiff
path: root/libc/startup/gpu/amdgpu/start.cpp
blob: cc30982e148ffbbf5222d663f34c5e36af3b6ab6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//===-- Implementation of crt for amdgpu ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "src/__support/RPC/rpc_client.h"

extern "C" int main(int argc, char **argv);

extern "C" [[gnu::visibility("protected"), clang::amdgpu_kernel]] void
_start(int argc, char **argv, int *ret, void *in, void *out, void *buffer) {
  __llvm_libc::rpc::client.reset(in, out, buffer);

  __atomic_fetch_or(ret, main(argc, argv), __ATOMIC_RELAXED);
}