35 unsigned int mbox_data[],
45 while (total < count) {
47 if (entries == 0)
break;
48 if (entries > count - total) entries = count - total;
59 unsigned int mbox_data[],
64 if (mbox_data == NULL || count < 1){
70 rc = _base_spe_out_mbox_read_ps(spectx, mbox_data, count);
77 if (errno == EAGAIN ) {
87 unsigned int *mbox_data,
98 while (total < count) {
100 if (space == 0)
break;
101 if (space > count - total) space = count - total;
113 unsigned int *mbox_data,
122 if (mbox_data == NULL || count < 1){
127 switch (behavior_flag) {
132 aux = mbox_data + total;
133 total += _base_spe_in_mbox_write_ps(spectx, aux, count - total);
136 fds.events = POLLOUT;
137 rc = poll(&fds, 1, -1);
141 }
while (total < count);
143 while (total < 4*count) {
145 (
const char *)mbox_data + total, 4*count - total);
159 total = _base_spe_in_mbox_write_ps(spectx, mbox_data, count);
162 fds.events = POLLOUT;
163 rc = poll(&fds, 1, -1);
167 }
while (total == 0);
178 total = _base_spe_in_mbox_write_ps(spectx, mbox_data, count);
181 if (rc == -1 && errno == EAGAIN) {
256 unsigned int mbox_data[],
263 if (mbox_data == NULL || count < 1){
268 switch (behavior_flag) {
271 while (total < 4*count) {
273 (
char *)mbox_data + total, 4*count - total);
287 if (rc == -1 && errno == EAGAIN) {
308 unsigned int signal_reg,
void _base_spe_close_if_open(struct spe_context *spe, enum fd_name fdesc)
unsigned int SPU_Mbox_Stat
int _base_spe_out_intr_mbox_status(spe_context_ptr_t spectx)
#define DEBUG_PRINTF(fmt, args...)
int _base_spe_in_mbox_status(spe_context_ptr_t spectx)
int _base_spe_open_if_closed(struct spe_context *spe, enum fd_name fdesc, int locked)
unsigned int SPU_Out_Mbox
#define SPE_MBOX_ANY_NONBLOCKING
void _base_spe_context_unlock(spe_context_ptr_t spe, enum fd_name fdesc)
#define SPE_MBOX_ALL_BLOCKING
int _base_spe_out_intr_mbox_read(spe_context_ptr_t spectx, unsigned int mbox_data[], int count, int behavior_flag)
int _base_spe_signal_write(spe_context_ptr_t spectx, unsigned int signal_reg, unsigned int data)
int _base_spe_in_mbox_write(spe_context_ptr_t spectx, unsigned int *mbox_data, int count, int behavior_flag)
unsigned int SPU_Sig_Notify_1
struct spe_context_base_priv * base_private
int _base_spe_out_mbox_read(spe_context_ptr_t spectx, unsigned int mbox_data[], int count)
#define SPE_MBOX_ANY_BLOCKING
void _base_spe_context_lock(spe_context_ptr_t spe, enum fd_name fdesc)
int _base_spe_out_mbox_status(spe_context_ptr_t spectx)
#define SPE_SIG_NOTIFY_REG_1
unsigned int SPU_Sig_Notify_2
#define SPE_SIG_NOTIFY_REG_2