File: assert.c

package info (click to toggle)
optee-os 4.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,560 kB
  • sloc: ansic: 441,914; asm: 12,903; python: 3,719; makefile: 1,676; sh: 238
file content (28 lines) | stat: -rw-r--r-- 619 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// SPDX-License-Identifier: BSD-2-Clause
/*
 * Copyright (c) 2014, STMicroelectronics International N.V.
 */

#include <assert.h>
#include <compiler.h>
#include <trace.h>
#include <tee_internal_api.h>
#include <tee_internal_api_extensions.h>
#include <utee_syscalls.h>

void _assert_log(const char *expr __maybe_unused,
		 const char *file __maybe_unused,
		 const int line __maybe_unused,
		 const char *func __maybe_unused)
{
	EMSG_RAW("assertion '%s' failed at %s:%d in %s()",
				expr, file, line, func);
}

void __noreturn _assert_break(void)
{
	_utee_panic(TEE_ERROR_GENERIC);
	/* Not reached */
	while (1)
		;
}