Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
81d08053
Commit
81d08053
authored
9 years ago
by
Kostyantyn Vorobyov
Browse files
Options
Downloads
Patches
Plain Diff
[RTL] Doxygen-style comments for e_acsl_syscall.h
parent
0ab59768
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/e-acsl/share/e-acsl/e_acsl_syscall.h
+17
-10
17 additions, 10 deletions
src/plugins/e-acsl/share/e-acsl/e_acsl_syscall.h
with
17 additions
and
10 deletions
src/plugins/e-acsl/share/e-acsl/e_acsl_syscall.h
+
17
−
10
View file @
81d08053
...
...
@@ -20,12 +20,25 @@
/* */
/**************************************************************************/
/* Re-declaration of standard libc syscall-based functions using direct
* application of syscall. The aim is to avoid issues for the case when a
/*! ***********************************************************************
* \file e_acsl_syscall.h
* \brief E-ACSL \p syscall bindings.
*
* Re-declaration of standard libc syscall-based functions using direct
* application of \p syscall. The aim is to avoid issues for the case when a
* target program provides custom implementations or wrappers for such
* functions. For instance, if an instrumented program provides a custom
* implementation of `write` E-ACSL RTL will still use the native system
* call. */
* call.
*
* Note that this header following does not provide a re-declaration for \p
* mmap. This is because \p syscall returns \p int, while \p mmap should
* return an integer type wide enough to hold a memory address address. Also,
* since there is no \p sbrk system call, a re-declaration of \p sbrk is also
* missing. As a result, programs providing custom definitions of \p syscall,
* \p mmap or \p sbrk should be rejected. Re-definitions of the below functions
* should be safe.
***************************************************************************/
#ifndef E_ACSL_SYSCALL
#define E_ACSL_SYSCALL
...
...
@@ -33,14 +46,8 @@
# include <fcntl.h>
# include <unistd.h>
# include <sys/syscall.h>
/* SYS_xxx definitions */
int
syscall
(
int
number
,
...);
/* Note that the following does not provide a re-declaration for `mmap`. This
* is because syscall returns int, while mmap should return an integer type wide
* enough to hold a memory address address. Also, since there is no `sbrk`
* system call, re-declaration of sbrk is also missing. As a result, programs
* providing custom definitions of `syscall`, `mmap` or `sbrk` should be
* rejected. Re-definitions of the below functions should be safe. */
int
syscall
(
int
number
,
...);
# define write(...) syscall(SYS_write, __VA_ARGS__)
# define open(...) syscall(SYS_open, __VA_ARGS__)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment