Skip to content

Commit b3d9b30

Browse files
librumpxen_xendev: Rename applicable d' variables to du'
This used to be a reference to the shared device context structure. Now there are three structures. Now there are three structures. Change all the variables referring to what is now struct rumpxenbus_data_user to `du'. This completes the elimination of the conventional variable name `d'. No functional change. Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
1 parent d25ab6f commit b3d9b30

1 file changed

Lines changed: 33 additions & 33 deletions

File tree

platform/xen/librumpxen_xendev/busdev_user.c

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -488,18 +488,18 @@ rumpxenbus_next_event_msg(struct rumpxenbus_data_common *dc,
488488
* Must be called with dd->lock held; may temporarily release it
489489
* by calling rumpxenbus_block_{before,after}. */
490490
{
491-
struct rumpxenbus_data_user *d = dc->du;
491+
struct rumpxenbus_data_user *du = dc->du;
492492
int nlocks;
493493
DEFINE_WAIT(w);
494494
spin_lock(&xenbus_req_lock);
495495

496-
while (STAILQ_EMPTY(&d->replies.events)) {
496+
while (STAILQ_EMPTY(&du->replies.events)) {
497497
if (!block)
498498
goto fail;
499499

500-
DPRINTF(("/dev/xen/xenbus[%p,du=%p]: about to block\n",dc,d));
500+
DPRINTF(("/dev/xen/xenbus[%p,du=%p]: about to block\n",dc,du));
501501

502-
minios_add_waiter(w, d->replies.waitq);
502+
minios_add_waiter(w, du->replies.waitq);
503503
spin_unlock(&xenbus_req_lock);
504504
rumpxenbus_block_before(dc);
505505
rumpkern_unsched(&nlocks, 0);
@@ -509,10 +509,10 @@ rumpxenbus_next_event_msg(struct rumpxenbus_data_common *dc,
509509
rumpkern_sched(nlocks, 0);
510510
rumpxenbus_block_after(dc);
511511
spin_lock(&xenbus_req_lock);
512-
minios_remove_waiter(w, d->replies.waitq);
512+
minios_remove_waiter(w, du->replies.waitq);
513513
}
514-
struct xenbus_event *event = STAILQ_FIRST(&d->replies.events);
515-
STAILQ_REMOVE_HEAD(&d->replies.events, entry);
514+
struct xenbus_event *event = STAILQ_FIRST(&du->replies.events);
515+
STAILQ_REMOVE_HEAD(&du->replies.events, entry);
516516

517517
spin_unlock(&xenbus_req_lock);
518518

@@ -531,35 +531,35 @@ static void
531531
xenbus_dev_xb_wakeup(struct xenbus_event_queue *queue)
532532
{
533533
/* called with req_lock held */
534-
struct rumpxenbus_data_user *d =
534+
struct rumpxenbus_data_user *du =
535535
container_of(queue, struct rumpxenbus_data_user, replies);
536-
DPRINTF(("/dev/xen/xenbus[queue=%p,du=%p]: wakeup...\n",queue,d));
537-
minios_wake_up(&d->replies.waitq);
538-
rumpxenbus_dev_xb_wakeup(d->c);
536+
DPRINTF(("/dev/xen/xenbus[queue=%p,du=%p]: wakeup...\n",queue,du));
537+
minios_wake_up(&du->replies.waitq);
538+
rumpxenbus_dev_xb_wakeup(du->c);
539539
}
540540

541541
void
542542
rumpxenbus_dev_restart_wakeup(struct rumpxenbus_data_common *dc)
543543
{
544-
struct rumpxenbus_data_user *d = dc->du;
544+
struct rumpxenbus_data_user *du = dc->du;
545545
spin_lock(&xenbus_req_lock);
546-
minios_wake_up(&d->replies.waitq);
546+
minios_wake_up(&du->replies.waitq);
547547
spin_unlock(&xenbus_req_lock);
548548
}
549549

550550
void
551551
rumpxenbus_dev_user_shutdown(struct rumpxenbus_data_common *dc)
552552
{
553-
struct rumpxenbus_data_user *d = dc->du;
553+
struct rumpxenbus_data_user *du = dc->du;
554554
for (;;) {
555-
DPRINTF(("/dev/xen/xenbus[%p,du=%p]: close loop\n",dc,d));
555+
DPRINTF(("/dev/xen/xenbus[%p,du=%p]: close loop\n",dc,du));
556556
/* We need to go round this again and again because
557557
* there might be requests in flight. Eg if the
558558
* user has an XS_WATCH in flight we have to wait for it
559559
* to be done and then unwatch it again. */
560560

561561
struct xenbus_dev_watch *watch, *watch_tmp;
562-
LIST_FOREACH_SAFE(watch, &d->watches, entry, watch_tmp) {
562+
LIST_FOREACH_SAFE(watch, &du->watches, entry, watch_tmp) {
563563
DPRINTF(("/dev/xen/xenbus: close watch %p %d\n",
564564
watch, watch->visible_to_user));
565565
if (watch->visible_to_user) {
@@ -573,7 +573,7 @@ rumpxenbus_dev_user_shutdown(struct rumpxenbus_data_common *dc)
573573

574574
struct xenbus_dev_transaction *trans, *trans_tmp;
575575
const struct write_req trans_end_data = { "F", 2 };
576-
LIST_FOREACH_SAFE(trans, &d->transactions, entry, trans_tmp) {
576+
LIST_FOREACH_SAFE(trans, &du->transactions, entry, trans_tmp) {
577577
DPRINTF(("/dev/xen/xenbus: close transaction"
578578
" %p %lx\n",
579579
trans, (unsigned long)trans->tx_id));
@@ -586,9 +586,9 @@ rumpxenbus_dev_user_shutdown(struct rumpxenbus_data_common *dc)
586586
}
587587

588588
DPRINTF(("/dev/xen/xenbus: close outstanding=%d\n",
589-
d->outstanding_requests));
590-
KASSERT(d->outstanding_requests >= 0);
591-
if (!d->outstanding_requests)
589+
du->outstanding_requests));
590+
KASSERT(du->outstanding_requests >= 0);
591+
if (!du->outstanding_requests)
592592
break;
593593

594594
void (*dfree)(void*);
@@ -600,11 +600,11 @@ rumpxenbus_dev_user_shutdown(struct rumpxenbus_data_common *dc)
600600
dfree(discard);
601601
}
602602

603-
KASSERT(!d->outstanding_requests);
604-
KASSERT(LIST_EMPTY(&d->transactions));
605-
KASSERT(LIST_EMPTY(&d->watches));
603+
KASSERT(!du->outstanding_requests);
604+
KASSERT(LIST_EMPTY(&du->transactions));
605+
KASSERT(LIST_EMPTY(&du->watches));
606606

607-
xbd_free(d);
607+
xbd_free(du);
608608
dc->du = NULL;
609609
}
610610

@@ -613,18 +613,18 @@ rumpxenbus_dev_user_open(struct rumpxenbus_data_common *dc)
613613
{
614614
assert(!dc->du);
615615

616-
struct rumpxenbus_data_user *d = dc->du = xbd_malloc(sizeof(*dc->du));
617-
if (!d)
616+
struct rumpxenbus_data_user *du = dc->du = xbd_malloc(sizeof(*dc->du));
617+
if (!du)
618618
return ENOMEM;
619619

620-
DPRINTF(("/dev/xen/xenbus[%p,dd=%p]: open: user...\n",dc,d));
620+
DPRINTF(("/dev/xen/xenbus[%p,dd=%p]: open: user...\n",dc,du));
621621

622-
d->c = dc;
623-
d->outstanding_requests = 0;
624-
LIST_INIT(&d->transactions);
625-
LIST_INIT(&d->watches);
626-
xenbus_event_queue_init(&d->replies);
627-
d->replies.wakeup = xenbus_dev_xb_wakeup;
622+
du->c = dc;
623+
du->outstanding_requests = 0;
624+
LIST_INIT(&du->transactions);
625+
LIST_INIT(&du->watches);
626+
xenbus_event_queue_init(&du->replies);
627+
du->replies.wakeup = xenbus_dev_xb_wakeup;
628628

629629
dc->wbuf_used = 0;
630630
dc->queued_enomem = 0;

0 commit comments

Comments
 (0)