File: cleanup.c

package info (click to toggle)
tinyssh 20190101-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,208 kB
  • sloc: ansic: 11,914; sh: 1,005; python: 385; makefile: 18
file content (10 lines) | stat: -rw-r--r-- 276 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
#include "cleanup.h"
#include "hasasmvolatilememory.h"

void cleanup_(void *yv, long long ylen) {
    volatile char *y = (volatile char *)yv; 
    while (ylen > 0) { *y++ = 0; --ylen; }
#ifdef HASASMVOLATILEMEMORY
    __asm__ __volatile__("" : : "r"(yv) : "memory");
#endif
}