CDA SC510 Podręcznik Użytkownika Strona 12

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 11
IST-033576 D2.1.4
EIO: Problem writing the checkpoint output.
ENOSPC: Out of space on filesystem while writing the check-
point
2.4.4 Callback
If the user wants some specific logic to be executed before the dump, BLCR pro-
vides a way to register user-level callback function triggered whenever a check-
point is about to occur, and which continue when a restart is initiated. Callbacks
are designed to be written in the following style :
vo i d m y_c a l l b a c k ( v oi d d a t a _ p t r )
{
s t r u c t my_data p d a t a =( s t r u c t my_data )
d a t a _ p t r ;
/ / do c h e c k p o i n t t i m e s hu t do wn l o g i c
/ / t e l l s y s t e m t o do t h e c h e c k p o i n t
d i d _ r e s t a r t = c r _ c h e c k p o i n t ( ) ;
i f ( d i d _ r e s t a r t )
/ / we ve be en r e s t a r t e d fr o m a
c h e c k p o i n t
e l s e
/ / we r e c o n t i n u i n g a f t e r t h e
c h e c k p o i n t
}
Following function must be used to register a callback :
c r _ r e g i s t e r _ c a l l b a c k ( c r _ c a l l b a c k _ t f unc , v oi d a rg ,
i n t f l a g s ) ;
Arguments are the following :
func: pointer to a function taking a void* as its argument and returning an
int (it’s the callback function)
arg: pointer which will be passed as argument to the callback when it will
be invoked
XtreemOS–Integrated Project 10/49
Przeglądanie stron 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 50 51

Komentarze do niniejszej Instrukcji

Brak uwag