From d0cc5c3139728b19d1c99c16b9ca55ac86e51002 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Tue, 14 Jun 2022 15:49:06 +0200 Subject: [PATCH] cpu: remove hidden driver api functions, rename sched to gsched to avoid naming conflicts Signed-off-by: Niklas Eiling --- cpu/Makefile | 5 +++-- cpu/cpu-client-driver.c | 4 ++-- cpu/cpu-server-driver.c | 2 +- cpu/cpu-server.c | 2 +- cpu/cpu_rpc_prot.x | 6 +++--- cpu/{sched.h => gsched.h} | 0 cpu/{sched_none.c => gsched_none.c} | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) rename cpu/{sched.h => gsched.h} (100%) rename cpu/{sched_none.c => gsched_none.c} (99%) diff --git a/cpu/Makefile b/cpu/Makefile index ecafb6f5..8c5f28a1 100644 --- a/cpu/Makefile +++ b/cpu/Makefile @@ -37,7 +37,7 @@ SRC_SERVER = $(RPC_XDR) \ api-recorder.c \ resource-mg.c \ cr.c \ - sched_none.c + gsched_none.c SRC_SERVER_LIB = server-library.c SRC_SERVER_EXE = server-exe.c @@ -48,12 +48,13 @@ SRC_CLIENT = $(RPC_XDR) \ cpu-utils.c \ cpu-client-runtime.c \ cpu-client-driver.c \ - cpu-client-driver-hidden.c \ list.c \ log.c \ cpu-libwrap.c \ cpu-client-cusolver.c +# cpu-client-driver-hidden.c \ + ifdef WITH_IB SRC_SERVER += cpu-ib.c SRC_CLIENT += cpu-ib.c diff --git a/cpu/cpu-client-driver.c b/cpu/cpu-client-driver.c index 60453aa9..06f908be 100644 --- a/cpu/cpu-client-driver.c +++ b/cpu/cpu-client-driver.c @@ -614,7 +614,7 @@ DEF_FN(CUresult, cuGraphicsResourceSetMapFlags, CUgraphicsResource, resource, un //DEF_FN(CUresult, cuGetExportTable, const void**, ppExportTable, const CUuuid*, pExportTableId) // This function returns an array of 8 function pointers to hidden functions inside libcuda.so -CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) +/*CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) { enum clnt_stat retval; char *uuid = NULL; @@ -644,7 +644,7 @@ CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTable cd_client_hidden_incr(); return result.err; -} +}*/ DEF_FN(CUresult, cuOccupancyMaxActiveBlocksPerMultiprocessor, int*, numBlocks, CUfunction, func, int, blockSize, size_t, dynamicSMemSize) DEF_FN(CUresult, cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, int*, numBlocks, CUfunction, func, int, blockSize, size_t, dynamicSMemSize, unsigned int, flags) DEF_FN(CUresult, cuMemAdvise, CUdeviceptr, devPtr, size_t, count, CUmem_advise, advice, CUdevice, device) diff --git a/cpu/cpu-server-driver.c b/cpu/cpu-server-driver.c index cf009f1c..cf0ff3d7 100644 --- a/cpu/cpu-server-driver.c +++ b/cpu/cpu-server-driver.c @@ -11,7 +11,7 @@ #include "resource-mg.h" #define WITH_RECORDER #include "api-recorder.h" -#include "sched.h" +#include "gsched.h" int server_driver_init(int restore) { diff --git a/cpu/cpu-server.c b/cpu/cpu-server.c index fa09ddd2..fcf48f40 100644 --- a/cpu/cpu-server.c +++ b/cpu/cpu-server.c @@ -20,7 +20,7 @@ #endif //WITH_IB #define WITH_RECORDER #include "api-recorder.h" -#include "sched.h" +#include "gsched.h" INIT_SOCKTYPE diff --git a/cpu/cpu_rpc_prot.x b/cpu/cpu_rpc_prot.x index 44ed160a..2dbbb247 100644 --- a/cpu/cpu_rpc_prot.x +++ b/cpu/cpu_rpc_prot.x @@ -310,7 +310,7 @@ program RPC_CD_PROG { int rpc_cuCtxSetCurrent(ptr) = 1011; ptr_result rpc_cuDevicePrimaryCtxRetain(int) = 1012; ptr_result rpc_cuModuleGetFunction(ptr, string) = 1013; - ptr_result rpc_cuGetExportTable(string) = 1014; +/* ptr_result rpc_cuGetExportTable(string) = 1014;*/ ptr_result rpc_cuMemAlloc(ptr) = 1015; int_result rpc_cuCtxGetDevice(void) = 1016; int rpc_cuMemcpyHtoD(ptr, mem_data) = 1017; @@ -322,14 +322,14 @@ program RPC_CD_PROG { int rpc_cuModuleUnload(ptr) = 1021; /* HIDDEN DRIVER API */ - ptr_result rpc_hidden_get_device_ctx(int) = 1101; +/* ptr_result rpc_hidden_get_device_ctx(int) = 1101; ptr_result rpc_hidden_get_module(ptr, ptr, ptr, int) = 1105; ptr_result rpc_hidden_1_1(void) = 1111; void rpc_hidden_1_3(ptr, ptr) = 1113; ptr_result rpc_hidden_1_5(void) = 1115; void rpc_hidden_2_1(ptr) = 1121; int rpc_hidden_3_0(int, ptr, ptr) = 1130; - mem_result rpc_hidden_3_2(int, ptr) = 1132; + mem_result rpc_hidden_3_2(int, ptr) = 1132;*/ /* CUSOLVER */ ptr_result rpc_cusolverDnCreate(void) = 2001; diff --git a/cpu/sched.h b/cpu/gsched.h similarity index 100% rename from cpu/sched.h rename to cpu/gsched.h diff --git a/cpu/sched_none.c b/cpu/gsched_none.c similarity index 99% rename from cpu/sched_none.c rename to cpu/gsched_none.c index 9beb2dd8..69176933 100644 --- a/cpu/sched_none.c +++ b/cpu/gsched_none.c @@ -1,4 +1,4 @@ -#include "sched.h" +#include "gsched.h" #include "log.h" #include "list.h" #include