File: cleanup.c

package info (click to toggle)
tinyssh 20230101-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,244 kB
  • sloc: ansic: 12,106; sh: 1,168; python: 479; makefile: 42
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
}