Remove references to host server channels

The host server channels are not used; their function pointers are always NULL.

Change-Id: I7616499f5695b83a015e6ee18c004aba96838d63
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Peter Mitsis 2015-04-21 16:30:14 -04:00 committed by Anas Nashif
commit 6feec0d462
4 changed files with 36 additions and 126 deletions

View file

@ -109,12 +109,6 @@ extern int K_PoolCount;
extern int K_PipeCount;
extern const int K_max_eventnr;
extern PFN_CHANNEL_RW pHS_Channel_Put;
extern PFN_CHANNEL_RW pHS_Channel_PutW;
extern PFN_CHANNEL_RWT pHS_Channel_PutWT;
extern PFN_CHANNEL_RW pHS_Channel_Get;
extern PFN_CHANNEL_RW pHS_Channel_GetW;
extern PFN_CHANNEL_RWT pHS_Channel_GetWT;
extern PFN_CHANNEL_RWT pKS_Channel_PutWT;
extern PFN_CHANNEL_RWT pKS_Channel_GetWT;

View file

@ -88,17 +88,11 @@ typedef int (*PFN_CHANNEL_RWT)(kpipe_t,
K_PIPE_OPTION,
int32_t);
extern PFN_CHANNEL_RW pHS_Channel_Put; /* maps to HS_ChannelPut */
extern PFN_CHANNEL_RW pHS_Channel_PutW; /* maps to HS_ChannelPutW */
extern PFN_CHANNEL_RWT pKS_Channel_PutWT; /* maps to KS__ChannelPutWT
== _task_pipe_put */
extern PFN_CHANNEL_RWT pHS_Channel_PutWT; /* maps to HS_ChannelPutWT */
extern PFN_CHANNEL_RW pHS_Channel_Get; /* maps to HS_ChannelGet */
extern PFN_CHANNEL_RW pHS_Channel_GetW; /* maps to HS_ChannelGetW */
extern PFN_CHANNEL_RWT pKS_Channel_GetWT; /* maps to KS__ChannelGetWT
== _task_pipe_get */
extern PFN_CHANNEL_RWT pHS_Channel_GetWT; /* maps to HS_ChannelGetWT */
/* mapping of KS__ChannelXXX() to _task_pipe_xxx() functions */
#define KS__ChannelPutWT _task_pipe_put

View file

@ -51,24 +51,13 @@ int task_pipe_put(kpipe_t id,
int *NrOfBytesWritten,
K_PIPE_OPTION opt)
{
if (OBJ_NODE(id) != 0) { /* a target channel */
if (unlikely(pKS_Channel_PutWT == NULL))
return RC_FAIL; /* or an assert */
if (unlikely(pKS_Channel_PutWT == NULL))
return RC_FAIL; /* or an assert */
return (*pKS_Channel_PutWT)(id,
buffer,
NrOfBytesToWrite,
NrOfBytesWritten,
opt,
TICKS_NONE);
} else {
/* a host channel */
if (unlikely(pHS_Channel_Put == NULL))
return RC_FAIL; /* or an assert */
return (*pHS_Channel_Put)(
id, buffer, NrOfBytesToWrite, NrOfBytesWritten, opt);
}
return (*pKS_Channel_PutWT)(id, buffer,
NrOfBytesToWrite,
NrOfBytesWritten,
opt, TICKS_NONE);
}
/*******************************************************************************
@ -84,24 +73,13 @@ int task_pipe_put_wait(kpipe_t id,
int *NrOfBytesWritten,
K_PIPE_OPTION opt)
{
if (OBJ_NODE(id) != 0) { /* a target channel */
if (unlikely(pKS_Channel_PutWT == NULL))
return RC_FAIL; /* or an assert */
if (unlikely(pKS_Channel_PutWT == NULL))
return RC_FAIL; /* or an assert */
return (*pKS_Channel_PutWT)(id,
buffer,
NrOfBytesToWrite,
NrOfBytesWritten,
opt,
TICKS_UNLIMITED);
} else {
/* a host channel */
if (unlikely(pHS_Channel_PutW == NULL))
return RC_FAIL; /* or an assert */
return (*pHS_Channel_PutW)(
id, buffer, NrOfBytesToWrite, NrOfBytesWritten, opt);
}
return (*pKS_Channel_PutWT)(id, buffer,
NrOfBytesToWrite,
NrOfBytesWritten,
opt, TICKS_UNLIMITED);
}
/*******************************************************************************
@ -118,28 +96,13 @@ int task_pipe_put_wait_timeout(kpipe_t id,
K_PIPE_OPTION opt,
int32_t TimeOut)
{
if (OBJ_NODE(id) != 0) { /* a target channel */
if (unlikely(pKS_Channel_PutWT == NULL))
return RC_FAIL; /* or an assert */
if (unlikely(pKS_Channel_PutWT == NULL))
return RC_FAIL; /* or an assert */
return (*pKS_Channel_PutWT)(id,
buffer,
NrOfBytesToWrite,
NrOfBytesWritten,
opt,
TimeOut);
} else {
/* a host channel */
if (unlikely(pHS_Channel_PutWT == NULL))
return RC_FAIL; /* or an assert */
return (*pHS_Channel_PutWT)(id,
buffer,
NrOfBytesToWrite,
NrOfBytesWritten,
opt,
TimeOut);
}
return (*pKS_Channel_PutWT)(id, buffer,
NrOfBytesToWrite,
NrOfBytesWritten,
opt, TimeOut);
}
/*******************************************************************************
@ -155,24 +118,13 @@ int task_pipe_get(kpipe_t id,
int *NrOfBytesRead,
K_PIPE_OPTION opt)
{
if (OBJ_NODE(id) != 0) { /* a target channel */
if (unlikely(pKS_Channel_GetWT == NULL))
return RC_FAIL; /* or an assert */
if (unlikely(pKS_Channel_GetWT == NULL))
return RC_FAIL; /* or an assert */
return (*pKS_Channel_GetWT)(id,
buffer,
NrOfBytesToRead,
NrOfBytesRead,
opt,
TICKS_NONE);
} else {
/* a host channel */
if (unlikely(pHS_Channel_Get == NULL))
return RC_FAIL; /* or an assert */
return (*pHS_Channel_Get)(
id, buffer, NrOfBytesToRead, NrOfBytesRead, opt);
}
return (*pKS_Channel_GetWT)(id, buffer,
NrOfBytesToRead,
NrOfBytesRead,
opt, TICKS_NONE);
}
/*******************************************************************************
@ -188,22 +140,12 @@ int task_pipe_get_wait(kpipe_t id,
int *NrOfBytesRead,
K_PIPE_OPTION opt)
{
if (OBJ_NODE(id) != 0) { /* a target channel */
if (unlikely(pKS_Channel_GetWT == NULL))
return RC_FAIL; /* or an assert */
return (*pKS_Channel_GetWT)(id,
buffer,
NrOfBytesToRead,
NrOfBytesRead,
opt,
TICKS_UNLIMITED);
} else {
/* a host channel */
if (unlikely(pHS_Channel_GetW == NULL))
return RC_FAIL; /* or an assert */
return (*pHS_Channel_GetW)(
id, buffer, NrOfBytesToRead, NrOfBytesRead, opt);
}
if (unlikely(pKS_Channel_GetWT == NULL))
return RC_FAIL; /* or an assert */
return (*pKS_Channel_GetWT)(id, buffer,
NrOfBytesToRead,
NrOfBytesRead,
opt, TICKS_UNLIMITED);
}
/*******************************************************************************
@ -220,24 +162,10 @@ int task_pipe_get_wait_timeout(kpipe_t id,
K_PIPE_OPTION opt,
int32_t TimeOut)
{
if (OBJ_NODE(id) != 0) { /* a target channel */
if (unlikely(pKS_Channel_GetWT == NULL))
return RC_FAIL; /* or an assert */
return (*pKS_Channel_GetWT)(id,
buffer,
NrOfBytesToRead,
NrOfBytesRead,
opt,
TimeOut);
} else {
/* a host channel */
if (unlikely(pHS_Channel_GetWT == NULL))
return RC_FAIL; /* or an assert */
return (*pHS_Channel_GetWT)(id,
buffer,
NrOfBytesToRead,
NrOfBytesRead,
opt,
TimeOut);
}
if (unlikely(pKS_Channel_GetWT == NULL))
return RC_FAIL; /* or an assert */
return (*pKS_Channel_GetWT)(id, buffer,
NrOfBytesToRead,
NrOfBytesRead,
opt, TimeOut);
}

View file

@ -602,12 +602,6 @@ def kernel_main_c_pipes():
# pipe variables [should probably be eliminated]
kernel_main_c_out("\n" +
"PFN_CHANNEL_RW pHS_Channel_Put = (PFN_CHANNEL_RW)NULL;\n" +
"PFN_CHANNEL_RW pHS_Channel_PutW = (PFN_CHANNEL_RW)NULL;\n" +
"PFN_CHANNEL_RWT pHS_Channel_PutWT = (PFN_CHANNEL_RWT)NULL;\n" +
"PFN_CHANNEL_RW pHS_Channel_Get = (PFN_CHANNEL_RW)NULL;\n" +
"PFN_CHANNEL_RW pHS_Channel_GetW = (PFN_CHANNEL_RW)NULL;\n" +
"PFN_CHANNEL_RWT pHS_Channel_GetWT = (PFN_CHANNEL_RWT)NULL;\n" +
"PFN_CHANNEL_RWT pKS_Channel_PutWT = _task_pipe_put;\n" +
"PFN_CHANNEL_RWT pKS_Channel_GetWT = _task_pipe_get;\n")