mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-03 14:58:03 +02:00
intel: annotate the private symbols
They are less and easier to track than the public ones. The macro drm_public will be going away by the end of the series. Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
parent
1756d3d64b
commit
5966d37732
2 changed files with 24 additions and 12 deletions
17
intel/mm.c
17
intel/mm.c
|
|
@ -22,13 +22,18 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "xf86drm.h"
|
||||
#include "libdrm.h"
|
||||
#include "mm.h"
|
||||
|
||||
void mmDumpMemInfo(const struct mem_block *heap)
|
||||
drm_private void mmDumpMemInfo(const struct mem_block *heap)
|
||||
{
|
||||
drmMsg("Memory heap %p:\n", (void *)heap);
|
||||
if (heap == 0) {
|
||||
|
|
@ -54,7 +59,7 @@ void mmDumpMemInfo(const struct mem_block *heap)
|
|||
drmMsg("End of memory blocks\n");
|
||||
}
|
||||
|
||||
struct mem_block *mmInit(int ofs, int size)
|
||||
drm_private struct mem_block *mmInit(int ofs, int size)
|
||||
{
|
||||
struct mem_block *heap, *block;
|
||||
|
||||
|
|
@ -159,8 +164,8 @@ static struct mem_block *SliceBlock(struct mem_block *p,
|
|||
return p;
|
||||
}
|
||||
|
||||
struct mem_block *mmAllocMem(struct mem_block *heap, int size, int align2,
|
||||
int startSearch)
|
||||
drm_private struct mem_block *mmAllocMem(struct mem_block *heap, int size,
|
||||
int align2, int startSearch)
|
||||
{
|
||||
struct mem_block *p;
|
||||
const int mask = (1 << align2) - 1;
|
||||
|
|
@ -215,7 +220,7 @@ static int Join2Blocks(struct mem_block *p)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int mmFreeMem(struct mem_block *b)
|
||||
drm_private int mmFreeMem(struct mem_block *b)
|
||||
{
|
||||
if (!b)
|
||||
return 0;
|
||||
|
|
@ -242,7 +247,7 @@ int mmFreeMem(struct mem_block *b)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void mmDestroy(struct mem_block *heap)
|
||||
drm_private void mmDestroy(struct mem_block *heap)
|
||||
{
|
||||
struct mem_block *p;
|
||||
|
||||
|
|
|
|||
19
intel/mm.h
19
intel/mm.h
|
|
@ -29,6 +29,12 @@
|
|||
#ifndef MM_H
|
||||
#define MM_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "libdrm.h"
|
||||
|
||||
struct mem_block {
|
||||
struct mem_block *next, *prev;
|
||||
struct mem_block *next_free, *prev_free;
|
||||
|
|
@ -42,7 +48,7 @@ struct mem_block {
|
|||
* input: total size in bytes
|
||||
* return: a heap pointer if OK, NULL if error
|
||||
*/
|
||||
extern struct mem_block *mmInit(int ofs, int size);
|
||||
drm_private extern struct mem_block *mmInit(int ofs, int size);
|
||||
|
||||
/**
|
||||
* Allocate 'size' bytes with 2^align2 bytes alignment,
|
||||
|
|
@ -54,24 +60,25 @@ extern struct mem_block *mmInit(int ofs, int size);
|
|||
* startSearch = linear offset from start of heap to begin search
|
||||
* return: pointer to the allocated block, 0 if error
|
||||
*/
|
||||
extern struct mem_block *mmAllocMem(struct mem_block *heap, int size,
|
||||
int align2, int startSearch);
|
||||
drm_private extern struct mem_block *mmAllocMem(struct mem_block *heap,
|
||||
int size, int align2,
|
||||
int startSearch);
|
||||
|
||||
/**
|
||||
* Free block starts at offset
|
||||
* input: pointer to a block
|
||||
* return: 0 if OK, -1 if error
|
||||
*/
|
||||
extern int mmFreeMem(struct mem_block *b);
|
||||
drm_private extern int mmFreeMem(struct mem_block *b);
|
||||
|
||||
/**
|
||||
* destroy MM
|
||||
*/
|
||||
extern void mmDestroy(struct mem_block *mmInit);
|
||||
drm_private extern void mmDestroy(struct mem_block *mmInit);
|
||||
|
||||
/**
|
||||
* For debuging purpose.
|
||||
*/
|
||||
extern void mmDumpMemInfo(const struct mem_block *mmInit);
|
||||
drm_private extern void mmDumpMemInfo(const struct mem_block *mmInit);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue