blob: 73c7d1cc49e2299216292b7fe0e9a33798f2546f [file] [log] [blame]
Andrew Scull8d9e1212019-04-05 13:52:55 +01001/*
2 * Copyright 2019 The Hafnium Authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include "hf/arch/std.h"
Andrew Scull2b5fbad2019-04-05 13:55:56 +010020
21typedef size_t rsize_t;
22
23#define RSIZE_MAX SIZE_MAX
24
25/*
26 * Only the safer versions of these functions are exposed to reduce the chance
27 * of misusing the versions without bounds checking or null pointer checks.
28 *
29 * These functions don't return errno_t as per the specification and implicity
30 * have a constraint handler that panics.
31 */
32void memset_s(void *dest, rsize_t destsz, int ch, rsize_t count);