if ( sharing_enomem )
{
int rv;
- if ( (rv = mem_sharing_notify_enomem(currd, gfn, 1)) < 0 )
+
+ if ( (rv = mem_sharing_notify_enomem(currd, gfn, true)) < 0 )
{
gdprintk(XENLOG_ERR, "Domain %hu attempt to unshare "
"gfn %lx, ENOMEM and no helper (rc %d)\n",
}
int mem_sharing_notify_enomem(struct domain *d, unsigned long gfn,
- bool_t allow_sleep)
+ bool allow_sleep)
{
struct vcpu *v = current;
int rc;
/* Try to unshare. If we fail, communicate ENOMEM without
* sleeping. */
if ( mem_sharing_unshare_page(p2m->domain, gfn_l, 0) < 0 )
- (void)mem_sharing_notify_enomem(p2m->domain, gfn_l, 0);
+ mem_sharing_notify_enomem(p2m->domain, gfn_l, false);
mfn = p2m->get_entry(p2m, gfn, t, a, q, page_order, NULL);
}
* Foreign domains are okay to place an event as they
* won't go to sleep. */
(void)mem_sharing_notify_enomem(p2m->domain,
- gfn_x(gfn_add(gfn, i)),
- 0);
+ gfn_x(gfn_add(gfn, i)), false);
return rc;
}
omfn = p2m->get_entry(p2m, gfn_add(gfn, i),
rc = mem_sharing_unshare_page(d, gmfn, 0);
if ( rc )
{
- (void)mem_sharing_notify_enomem(d, gmfn, 0);
+ mem_sharing_notify_enomem(d, gmfn, false);
goto out_put_gfn;
}
/* Maybe the mfn changed */
return rc;
}
-bool_t vm_event_check_ring(struct vm_event_domain *ved)
+bool vm_event_check_ring(struct vm_event_domain *ved)
{
return (ved && ved->ring_page);
}
*
*/
int __vm_event_claim_slot(struct domain *d, struct vm_event_domain *ved,
- bool_t allow_sleep)
+ bool allow_sleep)
{
if ( !vm_event_check_ring(ved) )
return -EOPNOTSUPP;
* then it's the same as a foreign domain.
*/
int mem_sharing_notify_enomem(struct domain *d, unsigned long gfn,
- bool_t allow_sleep);
+ bool allow_sleep);
int mem_sharing_memop(XEN_GUEST_HANDLE_PARAM(xen_mem_sharing_op_t) arg);
int mem_sharing_domctl(struct domain *d,
struct xen_domctl_mem_sharing_op *mec);
void vm_event_cleanup(struct domain *d);
/* Returns whether a ring has been set up */
-bool_t vm_event_check_ring(struct vm_event_domain *ved);
+bool vm_event_check_ring(struct vm_event_domain *ved);
/* Returns 0 on success, -ENOSYS if there is no ring, -EBUSY if there is no
* available space and the caller is a foreign domain. If the guest itself
* succeed.
*/
int __vm_event_claim_slot(struct domain *d, struct vm_event_domain *ved,
- bool_t allow_sleep);
+ bool allow_sleep);
static inline int vm_event_claim_slot(struct domain *d,
struct vm_event_domain *ved)
{
- return __vm_event_claim_slot(d, ved, 1);
+ return __vm_event_claim_slot(d, ved, true);
}
static inline int vm_event_claim_slot_nosleep(struct domain *d,
struct vm_event_domain *ved)
{
- return __vm_event_claim_slot(d, ved, 0);
+ return __vm_event_claim_slot(d, ved, false);
}
void vm_event_cancel_slot(struct domain *d, struct vm_event_domain *ved);