File: GC.c

package info (click to toggle)
saclib 2.2.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 12,460 kB
  • sloc: ansic: 39,790; csh: 1,190; asm: 541; awk: 320; sh: 186; perl: 116; makefile: 87; sed: 48
file content (21 lines) | stat: -rw-r--r-- 603 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*======================================================================
                           GC()

Garbage collection entry-point.

This is a system- and compiler-dependent function which ensures that all
registers get pushed onto the stack. This is necessary since the GC-proper
GCSI() assumes that all GC roots are either located on the stack or in the
global variables.
======================================================================*/

#include <ucontext.h>
#include "saclib.h"

void GC(void)
{
  ucontext_t context;

  getcontext (&context);
  GCSI(sizeof(Word), (char *)&context);
}