Lines Matching refs:port

26 #include <port.h>
71 kill_interruptable_write_port(port_id port, int32 code, const void *buffer,
74 return write_port_etc(port, code, buffer, bufferSize, B_KILL_CAN_INTERRUPT,
80 debugger_write(port_id port, int32 code, const void *buffer, size_t bufferSize,
84 "port: %" B_PRId32 ", code: %" B_PRIx32 ", message: %p, size: %lu, "
86 thread_get_current_thread()->team->id, port, code, buffer, bufferSize,
108 if (teamDebugInfo.debugger_port != port
114 (teamDebugInfo.debugger_port != port ? "debugger port changed"
117 TRACE(("debugger_write(): writing to port...\n"));
119 error = write_port_etc(port, code, buffer, bufferSize,
267 // delete the debugger port write lock
273 // delete the nub port
457 // initialized, change the ownership of the debug port for the thread
461 // get the port
471 // set the new port ownership
485 // initialized for this thread, change the ownership of its debug port
488 // get the port
498 // set the new port ownership
540 // check, if there's a debug port already
544 // create a port, if there is none yet
545 port_id port = -1;
551 port = create_port(1, nameBuffer);
552 if (port < 0) {
553 dprintf("thread_hit_debug_event(): Failed to create debug port: "
554 "%s\n", strerror(port));
555 return port;
559 // check the debug info structures once more: get the debugger port, set
560 // the thread's debug port, and update the thread's debug flags
561 port_id deletePort = port;
587 // someone created a port for us (the port we've created will
589 port = thread->debug_info.debug_port;
591 thread->debug_info.debug_port = port;
592 deletePort = -1; // keep the port
597 port = thread->debug_info.debug_port;
599 // someone deleted our port
617 // delete the superfluous port
627 // send a message to the debugger port
636 "message to debugger port %" B_PRId32 "\n", thread->id,
648 // read a command from the debug port
651 ssize_t commandMessageSize = read_port_etc(port, &command,
658 "to receive message from port %" B_PRId32 ": %" B_PRIx32 "\n",
659 thread->id, port, error));
730 "message to debugger port %" B_PRId32 ": %" B_PRIx32 "\n",
1006 TRACE(("user_debug_team_deleted(team: %" B_PRId32 ", debugger port: "
1083 // get the team debug flags and debugger port
1516 thus have a debug port).
1535 // get the thread's debug port
1565 TRACE(("nub_thread_cleanup(%" B_PRId32 "): debugger port: %" B_PRId32 "\n",
1611 /** \brief Debug nub thread helper function that returns the debug port of
1627 // get the debug port
1651 // check, if we're still the current nub thread and get our port
1661 port_id port = nubThread->team->debug_info.nub_port;
1670 "port: %" B_PRId32 "\n", nubThread->id, nubThread->team->id, port));
1680 ssize_t messageSize = read_port_etc(port, &command, &message,
1684 // The port is no longer valid or we were interrupted by a kill
1736 "reply port: %" B_PRId32 ", address: %p, size: %" B_PRId32
1772 "reply port: %" B_PRId32 ", address: %p, size: %" B_PRId32
1852 // find the thread and get its debug port
1893 // find the thread and get its debug port
1920 // find the thread and get its debug port
2145 ": reply port: %" B_PRId32 ", thread: %" B_PRId32 ", "
2189 ": reply port: %" B_PRId32 ", signal: %d, handler: %p\n",
2209 // will write anything to the debugger port anymore.
2460 // The debugger port is either not longer existing or we got
2462 TRACE(("nub thread %" B_PRId32 ": failed to send reply to port "
2526 TRACE(("install_team_debugger(team: %" B_PRId32 ", port: %" B_PRId32 ", "
2537 TRACE(("install_team_debugger(): Failed to get debugger port info: "
2677 "%" B_PRId32 ", port: %" B_PRId32 "\n", debuggerTeam,
2692 snprintf(nameBuffer, sizeof(nameBuffer), "team %" B_PRId32 " debugger port "
2698 // create the nub port
2708 // make the debugger team the port owner; thus we know, if the debugger is
2755 // delete port and terminate thread
2777 port_id port = install_team_debugger(B_CURRENT_TEAM, -1,
2779 return port >= 0 ? B_OK : port;
2849 // if supplied, check whether the port is a valid port
2904 // Delete the nub port -- this will cause the nub thread to terminate and