/** * Copyright (C) ARM Limited 2010-2014. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */#ifndef __LOGGING_H__#define __LOGGING_H__#include <pthread.h>#define DRIVER_ERROR "\n Driver issue:\n >> gator.ko must be built against the current kernel version & configuration\n >> gator.ko should be co-located with gatord in the same directory\n >> OR insmod gator.ko prior to launching gatord"classLogging{public:Logging(booldebug);~Logging();voidlogError(constchar*file,intline,constchar*fmt,...);voidlogMessage(constchar*fmt,...);char*getLastError(){returnmErrBuf;}char*getLastMessage(){returnmLogBuf;}private:charmErrBuf[4096];// Arbitrarily large buffer to hold a stringcharmLogBuf[4096];// Arbitrarily large buffer to hold a stringboolmDebug;pthread_mutex_tmLoggingMutex;};externLogging*logg;externvoidhandleException()__attribute__((noreturn));#endif //__LOGGING_H__