libsys: Support for senda_reload().
Change-Id: I67f94515d2b89199643195d32d92f1bef9770359
This commit is contained in:
parent
e1f889d228
commit
d639cffec9
2 changed files with 16 additions and 3 deletions
|
@ -83,6 +83,7 @@ int stime(time_t *_top);
|
||||||
#define asynsend(ep, msg) asynsend3(ep, msg, 0)
|
#define asynsend(ep, msg) asynsend3(ep, msg, 0)
|
||||||
int asynsend3(endpoint_t ep, message *msg, int flags);
|
int asynsend3(endpoint_t ep, message *msg, int flags);
|
||||||
int asyn_geterror(endpoint_t *dst, message *msg, int *err);
|
int asyn_geterror(endpoint_t *dst, message *msg, int *err);
|
||||||
|
int senda_reload(void);
|
||||||
|
|
||||||
#define ASSERT(c) if(!(c)) { panic("%s:%d: assert %s failed", __FILE__, __LINE__, #c); }
|
#define ASSERT(c) if(!(c)) { panic("%s:%d: assert %s failed", __FILE__, __LINE__, #c); }
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ int fl;
|
||||||
int i, r, src_ind, dst_ind;
|
int i, r, src_ind, dst_ind;
|
||||||
unsigned flags;
|
unsigned flags;
|
||||||
static int inside = 0;
|
static int inside = 0;
|
||||||
int len, needack = 0;
|
int needack = 0;
|
||||||
|
|
||||||
/* Debug printf() causes asynchronous sends? */
|
/* Debug printf() causes asynchronous sends? */
|
||||||
if (inside) /* Panic will not work either then, so exit */
|
if (inside) /* Panic will not work either then, so exit */
|
||||||
|
@ -133,13 +133,25 @@ int fl;
|
||||||
*/
|
*/
|
||||||
next_slot++;
|
next_slot++;
|
||||||
|
|
||||||
|
/* Reload. */
|
||||||
|
inside = 0;
|
||||||
|
r = senda_reload();
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*===========================================================================*
|
||||||
|
* senda_reload *
|
||||||
|
*===========================================================================*/
|
||||||
|
int senda_reload()
|
||||||
|
{
|
||||||
|
int len;
|
||||||
|
|
||||||
assert(next_slot >= first_slot);
|
assert(next_slot >= first_slot);
|
||||||
len = next_slot - first_slot;
|
len = next_slot - first_slot;
|
||||||
assert(first_slot + len <= ASYN_NR);
|
assert(first_slot + len <= ASYN_NR);
|
||||||
assert(len >= 0);
|
assert(len >= 0);
|
||||||
|
|
||||||
inside = 0;
|
|
||||||
|
|
||||||
/* Tell the kernel to rescan the table */
|
/* Tell the kernel to rescan the table */
|
||||||
return ipc_senda(&msgtable[first_slot], len);
|
return ipc_senda(&msgtable[first_slot], len);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue