⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 envlock.c

📁 用于嵌入式Linux系统的标准C的库函数
💻 C
字号:
/*FUNCTION<<__env_lock>>, <<__env_unlock>>--lock environ variableINDEX	__env_lockINDEX	__env_unlockANSI_SYNOPSIS	#include "envlock.h"       void __env_lock (struct _reent *<[reent]>);       void __env_unlock (struct _reent *<[reent]>);TRAD_SYNOPSIS	void __env_lock(<[reent]>)       struct _reent *<[reent]>;	void __env_unlock(<[reent]>)       struct _reent *<[reent]>;DESCRIPTIONThe <<setenv>> family of routines call these functions when they needto modify the environ variable.  The version of these routines suppliedin the library does not do anything.  If multiple threads of executioncan call <<setenv>>, or if <<setenv>> can be called reentrantly, thenyou need to define your own versions of these functions in order tosafely lock the memory pool during a call.  If you do not, the memorypool may become corrupted.A call to <<setenv>> may call <<__env_lock>> recursively; that is,the sequence of calls may go <<__env_lock>>, <<__env_lock>>,<<__env_unlock>>, <<__env_unlock>>.  Any implementation of theseroutines must be careful to avoid causing a thread to wait for a lockthat it already holds.*/#include "envlock.h"void__env_lock (ptr)     struct _reent *ptr;{}void__env_unlock (ptr)     struct _reent *ptr;{}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -