📄 port_os.h
字号:
/*
* iRTOS
* Copyright (C) 2008 Dmitriy Cherepanov
*
* This file is part of iRTOS
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public either
* version 2.1 of the License, or (at your option) any later version.
* This source is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* Do not be lasy! Look http://irtos.sourceforge.net for the latest version.
*/
#ifndef _OS_PORT_FILE_H_
#define _OS_PORT_FILE_H_ 1
/** \file
*\if russian_lng
* Posix
*\else
* Posix
*\endif
*/
//#include "arch/posix/port_pthread.h"
/**
*\if russian_lng
* Posix port enter/exit critical functions
*\else
* Posix port enter/exit critical functions
*\endif
*/
//pthread_mutex_t kernel_mutex;
//extern unsigned iarch port_os_critic_nest;
// PTHREAD_MUTEX_RECURSIVE
#include "kernel/variables.h" //for thisTCB
#define PORT_ENTER_CRITICAL_SECTION()
// if (port_os_critic_nest == 0)
// pthread_mutex_lock(&kernel_mutex);
#define PORT_EXIT_CRITICAL_SECTION()
// port_os_critic_nest--;
// if (port_os_critic_nest == 0)
// pthread_mutex_unlock(&kernel_mutex)
/** may be need separate head file or macros*/
iClock port_os_sleep_for (iClock reque_waiting_time);
#endif /* _OS_PORT_FILE_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -