<s> """<STR_LIT>""" <EOL> import os <EOL> import logging <EOL> from ganeti import errors <EOL> try : <EOL> import ctypes <EOL> except ImportError : <EOL> ctypes = None <EOL> _MCL_CURRENT = <NUM_LIT:1> <EOL> _MCL_FUTURE = <NUM_LIT:2> <EOL> def Mlockall ( _ctypes = ctypes ) : <EOL> """<STR_LIT>""" <EOL> if _ctypes is None : <EOL> raise errors . NoCtypesError ( ) <EOL> try : <EOL> libc = _ctypes . cdll . LoadLibrary ( "<STR_LIT>" ) <EOL> except EnvironmentError , err : <EOL> logging . error ( "<STR_LIT>" , err ) <EOL> libc = None <EOL> if libc is None : <EOL> logging . error ( "<STR_LIT>" ) <EOL> return <EOL> libc . __errno_location . restype = _ctypes . POINTER ( _ctypes . c_int ) <EOL> if libc . mlockall ( _MCL_CURRENT | _MCL_FUTURE ) : <EOL> logging . error ( "<STR_LIT>" , <EOL> os . strerror ( libc . __errno_location ( ) . contents . value ) ) <EOL> return <EOL> logging . debug ( "<STR_LIT>" ) </s>
