etisserant@391: /* etisserant@391: This file is part of CanFestival, a library implementing CanOpen Stack. etisserant@391: etisserant@391: Copyright (C): Edouard TISSERANT and Francis DUPIN etisserant@391: etisserant@391: See COPYING file for copyrights details. etisserant@391: etisserant@391: This library is free software; you can redistribute it and/or etisserant@391: modify it under the terms of the GNU Lesser General Public etisserant@391: License as published by the Free Software Foundation; either etisserant@391: version 2.1 of the License, or (at your option) any later version. etisserant@391: etisserant@391: This library is distributed in the hope that it will be useful, etisserant@391: but WITHOUT ANY WARRANTY; without even the implied warranty of etisserant@391: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU etisserant@391: Lesser General Public License for more details. etisserant@391: etisserant@391: You should have received a copy of the GNU Lesser General Public etisserant@391: License along with this library; if not, write to the Free Software etisserant@391: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA etisserant@391: */ etisserant@391: etisserant@391: #ifndef __TIMERSCFG_H__ etisserant@391: #define __TIMERSCFG_H__ etisserant@391: etisserant@391: #include etisserant@391: #include etisserant@391: etisserant@391: /* Time unit : clock ticks (jiffies) */ etisserant@391: /* Time resolution : ticks per second (architecture-dependent value 'HZ' defined in linux/param.h) */ etisserant@391: etisserant@391: #define TIMEVAL unsigned long etisserant@391: #define TIMEVAL_MAX (~(TIMEVAL)0) >> 1 etisserant@391: #define MS_TO_TIMEVAL(ms) ( (ms * HZ) / 1000 ) etisserant@391: #define US_TO_TIMEVAL(us) ( (us * HZ) / 1000000) etisserant@391: etisserant@391: #define TASK_HANDLE struct task_struct* etisserant@391: etisserant@391: #endif