Lines Matching refs:area

55 	MessagingArea *area = new(nothrow) MessagingArea;
56 if (!area)
59 // create the area
60 area->fID = create_area("messaging", (void**)&area->fHeader,
63 if (area->fID < 0) {
64 delete area;
69 area->fSize = kMessagingAreaSize;
70 area->fLockSem = lockSem;
71 area->fCounterSem = counterSem;
72 area->fNextArea = NULL;
73 area->InitHeader();
75 return area;
151 // the area is used as a ring buffer
154 // the simple case first: the area is empty
222 MessagingArea::SetNextArea(MessagingArea *area)
224 fNextArea = area;
330 // create an area
361 MessagingArea *area = fFirstArea;
362 fFirstArea = area->NextArea();
363 delete area;
389 MessagingArea *area;
393 area, data, wasEmpty);
399 PRINT((" Allocated space for send message command: area: %p, data: %p, "
400 "wasEmpty: %d\n", area, data, wasEmpty));
411 area->Unlock();
413 area->CommitCommand();
421 MessagingArea *&area, void *&data, bool &wasEmpty)
434 area = fFirstArea;
435 area->Lock();
436 if (!area->IsEmpty()) {
437 area->Unlock();
441 PRINT(("MessagingService::_AllocateCommand(): Discarding area: %p\n",
442 area));
444 fFirstArea = area->NextArea();
445 area->SetNextArea(NULL);
446 discardedArea = area;
447 discardedAreaDeleter.SetTo(area);
450 // allocate space for the command in the last area
451 area = fLastArea;
452 area->Lock();
453 data = area->AllocateCommand(commandWhat, size, wasEmpty);
456 // not enough space in the last area: create a new area or reuse a
459 area = discardedAreaDeleter.Detach();
460 area->InitHeader();
462 "left in current area. Recycling discarded one: %p\n", area));
464 area = MessagingArea::Create(fLockSem, fCounterSem);
466 "left in current area. Allocated new one: %p\n", area));
468 if (!area) {
473 // add the new area
474 fLastArea->SetNextArea(area);
476 fLastArea = area;
479 data = area->AllocateCommand(commandWhat, size, wasEmpty);
483 area->Unlock();
557 command into an empty area. Semaphore counter must be initialized
560 - The ID of the kernel area used for communication, if everything went fine,