source: mainline/kernel/generic/src/ipc/ipc.c@ 4ca28512

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 4ca28512 was 4ca28512, checked in by Jakub Jermar <jakub@…>, 16 years ago

Remove ipc_call_static_init() and IPC_CALL_STATIC_ALLOC.

  • Property mode set to 100644
File size: 18.5 KB
Line 
1/*
2 * Copyright (c) 2006 Ondrej Palkovsky
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * - Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * - Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * - The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29/** @addtogroup genericipc
30 * @{
31 */
32/** @file
33 */
34
35/* Lock ordering
36 *
37 * First the answerbox, then the phone.
38 */
39
40#include <synch/synch.h>
41#include <synch/spinlock.h>
42#include <synch/mutex.h>
43#include <synch/waitq.h>
44#include <synch/synch.h>
45#include <ipc/ipc.h>
46#include <ipc/kbox.h>
47#include <ipc/event.h>
48#include <errno.h>
49#include <mm/slab.h>
50#include <arch.h>
51#include <proc/task.h>
52#include <memstr.h>
53#include <debug.h>
54#include <print.h>
55#include <console/console.h>
56#include <proc/thread.h>
57#include <arch/interrupt.h>
58#include <ipc/irq.h>
59
60/** Open channel that is assigned automatically to new tasks */
61answerbox_t *ipc_phone_0 = NULL;
62
63static slab_cache_t *ipc_call_slab;
64
65/** Initialize a call structure.
66 *
67 * @param call Call structure to be initialized.
68 */
69static void _ipc_call_init(call_t *call)
70{
71 memsetb(call, sizeof(*call), 0);
72 call->callerbox = &TASK->answerbox;
73 call->sender = TASK;
74 call->buffer = NULL;
75}
76
77/** Allocate and initialize a call structure.
78 *
79 * The call is initialized, so that the reply will be directed to
80 * TASK->answerbox.
81 *
82 * @param flags Parameters for slab_alloc (e.g FRAME_ATOMIC).
83 *
84 * @return If flags permit it, return NULL, or initialized kernel
85 * call structure.
86 */
87call_t *ipc_call_alloc(int flags)
88{
89 call_t *call;
90
91 call = slab_alloc(ipc_call_slab, flags);
92 if (call)
93 _ipc_call_init(call);
94
95 return call;
96}
97
98/** Deallocate a call structure.
99 *
100 * @param call Call structure to be freed.
101 */
102void ipc_call_free(call_t *call)
103{
104 /* Check to see if we have data in the IPC_M_DATA_SEND buffer. */
105 if (call->buffer)
106 free(call->buffer);
107 slab_free(ipc_call_slab, call);
108}
109
110/** Initialize an answerbox structure.
111 *
112 * @param box Answerbox structure to be initialized.
113 * @param task Task to which the answerbox belongs.
114 */
115void ipc_answerbox_init(answerbox_t *box, task_t *task)
116{
117 spinlock_initialize(&box->lock, "ipc_box_lock");
118 spinlock_initialize(&box->irq_lock, "ipc_box_irqlock");
119 waitq_initialize(&box->wq);
120 list_initialize(&box->connected_phones);
121 list_initialize(&box->calls);
122 list_initialize(&box->dispatched_calls);
123 list_initialize(&box->answers);
124 list_initialize(&box->irq_notifs);
125 list_initialize(&box->irq_head);
126 box->task = task;
127}
128
129/** Connect a phone to an answerbox.
130 *
131 * @param phone Initialized phone structure.
132 * @param box Initialized answerbox structure.
133 */
134void ipc_phone_connect(phone_t *phone, answerbox_t *box)
135{
136 mutex_lock(&phone->lock);
137
138 phone->state = IPC_PHONE_CONNECTED;
139 phone->callee = box;
140
141 spinlock_lock(&box->lock);
142 list_append(&phone->link, &box->connected_phones);
143 spinlock_unlock(&box->lock);
144
145 mutex_unlock(&phone->lock);
146}
147
148/** Initialize a phone structure.
149 *
150 * @param phone Phone structure to be initialized.
151 */
152void ipc_phone_init(phone_t *phone)
153{
154 mutex_initialize(&phone->lock, MUTEX_PASSIVE);
155 phone->callee = NULL;
156 phone->state = IPC_PHONE_FREE;
157 atomic_set(&phone->active_calls, 0);
158}
159
160/** Helper function to facilitate synchronous calls.
161 *
162 * @param phone Destination kernel phone structure.
163 * @param request Call structure with request.
164 *
165 * @return EOK on success or EINTR if the sleep was interrupted.
166 */
167int ipc_call_sync(phone_t *phone, call_t *request)
168{
169 answerbox_t sync_box;
170
171 ipc_answerbox_init(&sync_box, TASK);
172
173 /* We will receive data in a special box. */
174 request->callerbox = &sync_box;
175
176 ipc_call(phone, request);
177 if (!ipc_wait_for_call(&sync_box, SYNCH_NO_TIMEOUT,
178 SYNCH_FLAGS_INTERRUPTIBLE))
179 return EINTR;
180 return EOK;
181}
182
183/** Answer a message which was not dispatched and is not listed in any queue.
184 *
185 * @param call Call structure to be answered.
186 */
187static void _ipc_answer_free_call(call_t *call)
188{
189 answerbox_t *callerbox = call->callerbox;
190
191 call->flags |= IPC_CALL_ANSWERED;
192
193 if (call->flags & IPC_CALL_FORWARDED) {
194 if (call->caller_phone) {
195 /* Demasquerade the caller phone. */
196 call->data.phone = call->caller_phone;
197 }
198 }
199
200 spinlock_lock(&callerbox->lock);
201 list_append(&call->link, &callerbox->answers);
202 spinlock_unlock(&callerbox->lock);
203 waitq_wakeup(&callerbox->wq, WAKEUP_FIRST);
204}
205
206/** Answer a message which is in a callee queue.
207 *
208 * @param box Answerbox that is answering the message.
209 * @param call Modified request that is being sent back.
210 */
211void ipc_answer(answerbox_t *box, call_t *call)
212{
213 /* Remove from active box */
214 spinlock_lock(&box->lock);
215 list_remove(&call->link);
216 spinlock_unlock(&box->lock);
217 /* Send back answer */
218 _ipc_answer_free_call(call);
219}
220
221/** Simulate sending back a message.
222 *
223 * Most errors are better handled by forming a normal backward
224 * message and sending it as a normal answer.
225 *
226 * @param phone Phone structure the call should appear to come from.
227 * @param call Call structure to be answered.
228 * @param err Return value to be used for the answer.
229 */
230void ipc_backsend_err(phone_t *phone, call_t *call, unative_t err)
231{
232 call->data.phone = phone;
233 atomic_inc(&phone->active_calls);
234 IPC_SET_RETVAL(call->data, err);
235 _ipc_answer_free_call(call);
236}
237
238/** Unsafe unchecking version of ipc_call.
239 *
240 * @param phone Phone structure the call comes from.
241 * @param box Destination answerbox structure.
242 * @param call Call structure with request.
243 */
244static void _ipc_call(phone_t *phone, answerbox_t *box, call_t *call)
245{
246 if (!(call->flags & IPC_CALL_FORWARDED)) {
247 atomic_inc(&phone->active_calls);
248 call->data.phone = phone;
249 }
250
251 spinlock_lock(&box->lock);
252 list_append(&call->link, &box->calls);
253 spinlock_unlock(&box->lock);
254 waitq_wakeup(&box->wq, WAKEUP_FIRST);
255}
256
257/** Send an asynchronous request using a phone to an answerbox.
258 *
259 * @param phone Phone structure the call comes from and which is
260 * connected to the destination answerbox.
261 * @param call Call structure with request.
262 *
263 * @return Return 0 on success, ENOENT on error.
264 */
265int ipc_call(phone_t *phone, call_t *call)
266{
267 answerbox_t *box;
268
269 mutex_lock(&phone->lock);
270 if (phone->state != IPC_PHONE_CONNECTED) {
271 mutex_unlock(&phone->lock);
272 if (call->flags & IPC_CALL_FORWARDED) {
273 IPC_SET_RETVAL(call->data, EFORWARD);
274 _ipc_answer_free_call(call);
275 } else {
276 if (phone->state == IPC_PHONE_HUNGUP)
277 ipc_backsend_err(phone, call, EHANGUP);
278 else
279 ipc_backsend_err(phone, call, ENOENT);
280 }
281 return ENOENT;
282 }
283 box = phone->callee;
284 _ipc_call(phone, box, call);
285
286 mutex_unlock(&phone->lock);
287 return 0;
288}
289
290/** Disconnect phone from answerbox.
291 *
292 * This call leaves the phone in the HUNGUP state. The change to 'free' is done
293 * lazily later.
294 *
295 * @param phone Phone structure to be hung up.
296 *
297 * @return Return 0 if the phone is disconnected.
298 * Return -1 if the phone was already disconnected.
299 */
300int ipc_phone_hangup(phone_t *phone)
301{
302 answerbox_t *box;
303 call_t *call;
304
305 mutex_lock(&phone->lock);
306 if (phone->state == IPC_PHONE_FREE ||
307 phone->state == IPC_PHONE_HUNGUP ||
308 phone->state == IPC_PHONE_CONNECTING) {
309 mutex_unlock(&phone->lock);
310 return -1;
311 }
312 box = phone->callee;
313 if (phone->state != IPC_PHONE_SLAMMED) {
314 /* Remove myself from answerbox */
315 spinlock_lock(&box->lock);
316 list_remove(&phone->link);
317 spinlock_unlock(&box->lock);
318
319 call = ipc_call_alloc(0);
320 IPC_SET_METHOD(call->data, IPC_M_PHONE_HUNGUP);
321 call->flags |= IPC_CALL_DISCARD_ANSWER;
322 _ipc_call(phone, box, call);
323 }
324
325 phone->state = IPC_PHONE_HUNGUP;
326 mutex_unlock(&phone->lock);
327
328 return 0;
329}
330
331/** Forwards call from one answerbox to another one.
332 *
333 * @param call Call structure to be redirected.
334 * @param newphone Phone structure to target answerbox.
335 * @param oldbox Old answerbox structure.
336 * @param mode Flags that specify mode of the forward operation.
337 *
338 * @return Return 0 if forwarding succeeded or an error code if
339 * there was error.
340 *
341 * The return value serves only as an information for the forwarder,
342 * the original caller is notified automatically with EFORWARD.
343 */
344int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox, int mode)
345{
346 spinlock_lock(&oldbox->lock);
347 list_remove(&call->link);
348 spinlock_unlock(&oldbox->lock);
349
350 if (mode & IPC_FF_ROUTE_FROM_ME) {
351 if (!call->caller_phone)
352 call->caller_phone = call->data.phone;
353 call->data.phone = newphone;
354 }
355
356 return ipc_call(newphone, call);
357}
358
359
360/** Wait for a phone call.
361 *
362 * @param box Answerbox expecting the call.
363 * @param usec Timeout in microseconds. See documentation for
364 * waitq_sleep_timeout() for decription of its special
365 * meaning.
366 * @param flags Select mode of sleep operation. See documentation for
367 * waitq_sleep_timeout() for description of its special
368 * meaning.
369 * @return Recived call structure or NULL.
370 *
371 * To distinguish between a call and an answer, have a look at call->flags.
372 */
373call_t *ipc_wait_for_call(answerbox_t *box, uint32_t usec, int flags)
374{
375 call_t *request;
376 ipl_t ipl;
377 int rc;
378
379restart:
380 rc = waitq_sleep_timeout(&box->wq, usec, flags);
381 if (SYNCH_FAILED(rc))
382 return NULL;
383
384 spinlock_lock(&box->lock);
385 if (!list_empty(&box->irq_notifs)) {
386 ipl = interrupts_disable();
387 spinlock_lock(&box->irq_lock);
388
389 request = list_get_instance(box->irq_notifs.next, call_t, link);
390 list_remove(&request->link);
391
392 spinlock_unlock(&box->irq_lock);
393 interrupts_restore(ipl);
394 } else if (!list_empty(&box->answers)) {
395 /* Handle asynchronous answers */
396 request = list_get_instance(box->answers.next, call_t, link);
397 list_remove(&request->link);
398 atomic_dec(&request->data.phone->active_calls);
399 } else if (!list_empty(&box->calls)) {
400 /* Handle requests */
401 request = list_get_instance(box->calls.next, call_t, link);
402 list_remove(&request->link);
403 /* Append request to dispatch queue */
404 list_append(&request->link, &box->dispatched_calls);
405 } else {
406 /* This can happen regularly after ipc_cleanup */
407 spinlock_unlock(&box->lock);
408 goto restart;
409 }
410 spinlock_unlock(&box->lock);
411 return request;
412}
413
414/** Answer all calls from list with EHANGUP answer.
415 *
416 * @param lst Head of the list to be cleaned up.
417 */
418void ipc_cleanup_call_list(link_t *lst)
419{
420 call_t *call;
421
422 while (!list_empty(lst)) {
423 call = list_get_instance(lst->next, call_t, link);
424 if (call->buffer)
425 free(call->buffer);
426 list_remove(&call->link);
427
428 IPC_SET_RETVAL(call->data, EHANGUP);
429 _ipc_answer_free_call(call);
430 }
431}
432
433/** Disconnects all phones connected to an answerbox.
434 *
435 * @param box Answerbox to disconnect phones from.
436 * @param notify_box If true, the answerbox will get a hangup message for
437 * each disconnected phone.
438 */
439void ipc_answerbox_slam_phones(answerbox_t *box, bool notify_box)
440{
441 phone_t *phone;
442 DEADLOCK_PROBE_INIT(p_phonelck);
443 ipl_t ipl;
444 call_t *call;
445
446 call = notify_box ? ipc_call_alloc(0) : NULL;
447
448 /* Disconnect all phones connected to our answerbox */
449restart_phones:
450 ipl = interrupts_disable();
451 spinlock_lock(&box->lock);
452 while (!list_empty(&box->connected_phones)) {
453 phone = list_get_instance(box->connected_phones.next,
454 phone_t, link);
455 if (SYNCH_FAILED(mutex_trylock(&phone->lock))) {
456 spinlock_unlock(&box->lock);
457 interrupts_restore(ipl);
458 DEADLOCK_PROBE(p_phonelck, DEADLOCK_THRESHOLD);
459 goto restart_phones;
460 }
461
462 /* Disconnect phone */
463 ASSERT(phone->state == IPC_PHONE_CONNECTED);
464
465 list_remove(&phone->link);
466 phone->state = IPC_PHONE_SLAMMED;
467
468 if (notify_box) {
469 mutex_unlock(&phone->lock);
470 spinlock_unlock(&box->lock);
471 interrupts_restore(ipl);
472
473 /*
474 * Send one message to the answerbox for each
475 * phone. Used to make sure the kbox thread
476 * wakes up after the last phone has been
477 * disconnected.
478 */
479 IPC_SET_METHOD(call->data, IPC_M_PHONE_HUNGUP);
480 call->flags |= IPC_CALL_DISCARD_ANSWER;
481 _ipc_call(phone, box, call);
482
483 /* Allocate another call in advance */
484 call = ipc_call_alloc(0);
485
486 /* Must start again */
487 goto restart_phones;
488 }
489
490 mutex_unlock(&phone->lock);
491 }
492
493 spinlock_unlock(&box->lock);
494 interrupts_restore(ipl);
495
496 /* Free unused call */
497 if (call)
498 ipc_call_free(call);
499}
500
501/** Cleans up all IPC communication of the current task.
502 *
503 * Note: ipc_hangup sets returning answerbox to TASK->answerbox, you
504 * have to change it as well if you want to cleanup other tasks than TASK.
505 */
506void ipc_cleanup(void)
507{
508 int i;
509 call_t *call;
510
511 /* Disconnect all our phones ('ipc_phone_hangup') */
512 for (i = 0; i < IPC_MAX_PHONES; i++)
513 ipc_phone_hangup(&TASK->phones[i]);
514
515 /* Unsubscribe from any event notifications. */
516 event_cleanup_answerbox(&TASK->answerbox);
517
518 /* Disconnect all connected irqs */
519 ipc_irq_cleanup(&TASK->answerbox);
520
521 /* Disconnect all phones connected to our regular answerbox */
522 ipc_answerbox_slam_phones(&TASK->answerbox, false);
523
524#ifdef CONFIG_UDEBUG
525 /* Clean up kbox thread and communications */
526 ipc_kbox_cleanup();
527#endif
528
529 /* Answer all messages in 'calls' and 'dispatched_calls' queues */
530 spinlock_lock(&TASK->answerbox.lock);
531 ipc_cleanup_call_list(&TASK->answerbox.dispatched_calls);
532 ipc_cleanup_call_list(&TASK->answerbox.calls);
533 spinlock_unlock(&TASK->answerbox.lock);
534
535 /* Wait for all async answers to arrive */
536 while (1) {
537 /* Go through all phones, until all are FREE... */
538 /* Locking not needed, no one else should modify
539 * it, when we are in cleanup */
540 for (i = 0; i < IPC_MAX_PHONES; i++) {
541 if (TASK->phones[i].state == IPC_PHONE_HUNGUP &&
542 atomic_get(&TASK->phones[i].active_calls) == 0)
543 TASK->phones[i].state = IPC_PHONE_FREE;
544
545 /* Just for sure, we might have had some
546 * IPC_PHONE_CONNECTING phones */
547 if (TASK->phones[i].state == IPC_PHONE_CONNECTED)
548 ipc_phone_hangup(&TASK->phones[i]);
549 /* If the hangup succeeded, it has sent a HANGUP
550 * message, the IPC is now in HUNGUP state, we
551 * wait for the reply to come */
552
553 if (TASK->phones[i].state != IPC_PHONE_FREE)
554 break;
555 }
556 /* Voila, got into cleanup */
557 if (i == IPC_MAX_PHONES)
558 break;
559
560 call = ipc_wait_for_call(&TASK->answerbox, SYNCH_NO_TIMEOUT,
561 SYNCH_FLAGS_NONE);
562 ASSERT((call->flags & IPC_CALL_ANSWERED) ||
563 (call->flags & IPC_CALL_NOTIF));
564
565 /*
566 * Record the receipt of this call in the current task's counter
567 * of active calls. IPC_M_PHONE_HUNGUP calls do not contribute
568 * to this counter so do not record answers to them either.
569 */
570 if (!(call->flags & IPC_CALL_DISCARD_ANSWER))
571 atomic_dec(&TASK->active_calls);
572 ipc_call_free(call);
573 }
574}
575
576
577/** Initilize IPC subsystem */
578void ipc_init(void)
579{
580 ipc_call_slab = slab_cache_create("ipc_call", sizeof(call_t), 0, NULL,
581 NULL, 0);
582}
583
584
585/** List answerbox contents.
586 *
587 * @param taskid Task ID.
588 */
589void ipc_print_task(task_id_t taskid)
590{
591 task_t *task;
592 int i;
593 call_t *call;
594 link_t *tmp;
595
596 spinlock_lock(&tasks_lock);
597 task = task_find_by_id(taskid);
598 if (task)
599 spinlock_lock(&task->lock);
600 spinlock_unlock(&tasks_lock);
601 if (!task)
602 return;
603
604 /* Print opened phones & details */
605 printf("PHONE:\n");
606 for (i = 0; i < IPC_MAX_PHONES; i++) {
607 if (SYNCH_FAILED(mutex_trylock(&task->phones[i].lock))) {
608 printf("%d: mutex busy\n", i);
609 continue;
610 }
611 if (task->phones[i].state != IPC_PHONE_FREE) {
612 printf("%d: ", i);
613 switch (task->phones[i].state) {
614 case IPC_PHONE_CONNECTING:
615 printf("connecting ");
616 break;
617 case IPC_PHONE_CONNECTED:
618 printf("connected to: %p ",
619 task->phones[i].callee);
620 break;
621 case IPC_PHONE_SLAMMED:
622 printf("slammed by: %p ",
623 task->phones[i].callee);
624 break;
625 case IPC_PHONE_HUNGUP:
626 printf("hung up - was: %p ",
627 task->phones[i].callee);
628 break;
629 default:
630 break;
631 }
632 printf("active: %ld\n",
633 atomic_get(&task->phones[i].active_calls));
634 }
635 mutex_unlock(&task->phones[i].lock);
636 }
637
638
639 /* Print answerbox - calls */
640 spinlock_lock(&task->answerbox.lock);
641 printf("ABOX - CALLS:\n");
642 for (tmp = task->answerbox.calls.next; tmp != &task->answerbox.calls;
643 tmp = tmp->next) {
644 call = list_get_instance(tmp, call_t, link);
645 printf("Callid: %p Srctask:%" PRIu64 " M:%" PRIun
646 " A1:%" PRIun " A2:%" PRIun " A3:%" PRIun
647 " A4:%" PRIun " A5:%" PRIun " Flags:%x\n", call,
648 call->sender->taskid,
649 IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data),
650 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data),
651 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data),
652 call->flags);
653 }
654 /* Print answerbox - calls */
655 printf("ABOX - DISPATCHED CALLS:\n");
656 for (tmp = task->answerbox.dispatched_calls.next;
657 tmp != &task->answerbox.dispatched_calls;
658 tmp = tmp->next) {
659 call = list_get_instance(tmp, call_t, link);
660 printf("Callid: %p Srctask:%" PRIu64 " M:%" PRIun
661 " A1:%" PRIun " A2:%" PRIun " A3:%" PRIun
662 " A4:%" PRIun " A5:%" PRIun " Flags:%x\n", call,
663 call->sender->taskid,
664 IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data),
665 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data),
666 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data),
667 call->flags);
668 }
669 /* Print answerbox - calls */
670 printf("ABOX - ANSWERS:\n");
671 for (tmp = task->answerbox.answers.next;
672 tmp != &task->answerbox.answers;
673 tmp = tmp->next) {
674 call = list_get_instance(tmp, call_t, link);
675 printf("Callid:%p M:%" PRIun " A1:%" PRIun " A2:%" PRIun
676 " A3:%" PRIun " A4:%" PRIun " A5:%" PRIun " Flags:%x\n",
677 call, IPC_GET_METHOD(call->data), IPC_GET_ARG1(call->data),
678 IPC_GET_ARG2(call->data), IPC_GET_ARG3(call->data),
679 IPC_GET_ARG4(call->data), IPC_GET_ARG5(call->data),
680 call->flags);
681 }
682
683 spinlock_unlock(&task->answerbox.lock);
684 spinlock_unlock(&task->lock);
685}
686
687/** @}
688 */
Note: See TracBrowser for help on using the repository browser.