blob: 697bb2c34448e39db9b0eeff96d8a232de6a7f0a [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "tools/kazoo/output_util.h"
#include "tools/kazoo/outputs.h"
bool VdsoHeaderOutput(const SyscallLibrary& library, Writer* writer) {
if (!CopyrightHeaderWithCppComments(writer)){
return false;
}
for (const auto& syscall : library.syscalls()) {
CDeclaration(*syscall, "__LOCAL ", "VDSO_zx_", writer);
if (syscall->HasAttribute("Vdsocall")) {
continue;
}
CDeclaration(*syscall, "__LOCAL ", "SYSCALL_zx_", writer);
}
// TODO(syscall-fidl-transition): Original file has an extra \n, add one here
// for consistency.
writer->Puts("\n");
return true;
}