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

📄 mlock.c

📁 用于嵌入式Linux系统的标准C的库函数
💻 C
字号:
#ifndef MALLOC_PROVIDED/*FUNCTION<<__malloc_lock>>, <<__malloc_unlock>>--lock malloc poolINDEX	__malloc_lockINDEX	__malloc_unlockANSI_SYNOPSIS	#include <malloc.h>	void __malloc_lock (struct _reent *<[reent]>);	void __malloc_unlock (struct _reent *<[reent]>);TRAD_SYNOPSIS	void __malloc_lock(<[reent]>)	struct _reent *<[reent]>;	void __malloc_unlock(<[reent]>)	struct _reent *<[reent]>;DESCRIPTIONThe <<malloc>> family of routines call these functions when they needto lock the memory pool.  The version of these routines supplied inthe library does not do anything.  If multiple threads of executioncan call <<malloc>>, or if <<malloc>> 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 <<malloc>> may call <<__malloc_lock>> recursively; that is,the sequence of calls may go <<__malloc_lock>>, <<__malloc_lock>>,<<__malloc_unlock>>, <<__malloc_unlock>>.  Any implementation of theseroutines must be careful to avoid causing a thread to wait for a lockthat it already holds.*/#include <malloc.h>void__malloc_lock (ptr)     struct _reent *ptr;{}void__malloc_unlock (ptr)     struct _reent *ptr;{}#endif

⌨️ 快捷键说明

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