Files
rocm-systems/rocclr/compiler/lib/loaders/elf/utils/libelf/memfile.h
T
foreman 133f24578e P4 to Git Change 1279712 by smekhano@stas-rampitec-hsa on 2016/06/14 15:07:52
SWDEV-94189 - HSA Finalizer: do not use temp files
	New memfile interface is used to emulate files in memory inside perforce build.

	Testing: smoke, precheckin, test_compiler, vp9 in chrome sandbox

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/_libelf_config.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/elf_begin.c#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/memfile.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/memfile.h#2 edit
2016-06-14 15:53:29 -04:00

34 lines
1011 B
C

//
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
//
#ifndef _MEMFILE_H
#define _MEMFILE_H
#include <sys/types.h>
#if !defined(_MSC_VER)
#include <sys/stat.h>
#endif
#if defined(__cplusplus)
extern "C" {
#endif
// Acts the same as open(), but path can be NULL, which is a request for in memory file
extern int mem_open(const char *path, int oflag, int pmode);
extern off_t mem_read(int fd, void *buffer, size_t count);
extern off_t mem_write(int fd, const void *buffer, size_t count);
extern int mem_close(int fd);
extern off_t mem_lseek(int fd, off_t offset, int origin);
extern int mem_fstat(int fd, struct stat *buf);
extern int mem_ftruncate(int fd, size_t len);
extern off_t mem_sendfile(int out_fd, int in_fd, off_t *offset, size_t count);
extern void* mem_mmap(void* start, size_t length, int prot, int flags, int fd, unsigned offset);
extern int mem_munmap(void* start, size_t length);
#if defined(__cplusplus)
}
#endif
#endif // !_MEMFILE_H