• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/usr/eclipseclp/Pds/src/

Lines Matching refs:port

295     aport_id_t aport_id;	/* destination port 		 */
337 ** In general, when a message arrives on an empty port its associated
339 ** one such notification in progress per port. This limits the number
344 ** specific port options, e.g. disable/enable notifications.
349 struct aport * prev; /* previous port */
350 struct aport * next; /* next port */
351 aport_id_t aport_id; /* port identifier */
352 void (* notify_procedure) /* port notification procedure */
361 aport_info_t info; /* port statistics */
367 struct aport * prev; /* previous port */
368 struct aport * next; /* next port */
369 aport_id_t aport_id; /* port identifier */
370 void (* notify_procedure) (); /* port notification procedure */
378 aport_info_t info; /* port statistics */
390 port_init(port)
391 port_t * port;
393 port->prev = (port_t *) 0;
394 port->next = (port_t *) 0;
395 port->aport_id = 0;
396 l_mutex_init(&port->mutex);
397 port->notify_procedure = (void (*) ()) 0;
398 port->notify = 0;
399 port->notify_count = 0;
400 port->notify_level = 0;
401 port->notify_defer = (char *) APORT_NOTIFY_DEFER_GLOBAL - (char *) 0;
402 port->notify_pending = 0;
403 port->data = (void_ptr) 0;
404 port->info.sends = 0;
405 port->info.receives = 0;
406 port->first = (amsg_buffer_scratch_t *) 0;
407 port->last = (amsg_buffer_scratch_t *) 0;
553 unsigned size; /* in: # ports in default port set */
554 void (* notify_procedure []) (); /* in: port notifier procedures */
555 aport_id_t port_id []; /* out: port identifiers */
571 /* associate a number with each port */
606 /* initialise dynamic port array */
610 /* initialise static port array */
848 port_t * port;
863 NF_First(level,&port);
864 while (port) {
865 next = port->next;
866 P_Lock(port);
867 amsg_assert(port->notify_pending);
869 && ((port->notify_defer == (char *) APORT_NOTIFY_DEFER_GLOBAL - (char *) 0) ||
870 ((port->notify_count > 0) &&
871 (port->notify_defer == (char *) APORT_NOTIFY_DEFER_LOCAL - (char *) 0)))) {
872 P_Unlock(port);
873 port = next;
876 amsg_assert(port->notify);
877 NF_Isolate(port);
879 port->notify_pending = 0;
880 port->notify_count++;
881 P_Unlock(port);
884 port->notify_procedure(port->aport_id);
885 P_Lock(port);
886 port->notify_count--;
887 P_Unlock(port);
891 NF_First(level,&port);
1164 port_t * port;
1170 GetPort(port_id,&port);
1172 if (!port) {
1174 printf("No such port !\n");
1180 if (P_Empty(port)) {
1182 printf("Port 0x%lx Empty\n",(char *) port - (char *) 0);
1190 printf(" Port 0x%lx\n", (char *) port - (char *) 0);
1195 buf = port->first;
1267 port_t * port;
1286 port = notifications[level].first;
1288 printf(" 0x%lx \n", (char *) port - (char *) 0);
1289 port = port->next;
1290 while (port) {
1292 printf(" 0x%lx \n", (char *) port - (char *) 0);
1293 port = port->next;
1319 port_t * port;
1338 port = &dynamic_ports[index];
1339 P_Lock(port);
1340 port->aport_id = *port_id;
1341 port->notify_procedure = notify_procedure;
1342 if (port->notify_procedure)
1343 port->notify = 1;
1344 P_Unlock(port);
1357 port = &dynamic_ports[index];
1358 P_Lock(port);
1359 port->aport_id = *port_id;
1360 port->notify_procedure = notify_procedure;
1361 if (port->notify_procedure)
1362 port->notify = 1;
1363 P_Unlock(port);
1381 port_t * port;
1390 GetPort(port_id,&port);
1391 if (!port) return(AMSG_NOPORT);
1393 P_Lock(port);
1395 if ((!P_Empty(port)) || /* port not empty */
1396 (port->notify_count)) { /* notifications in progress */
1397 P_Unlock(port);
1402 port->aport_id = 0;
1403 port->notify_procedure = (void (*) ()) 0;
1404 port->notify = 0;
1405 port->notify_level = 0;
1406 port->notify_defer = (char *) APORT_NOTIFY_DEFER_GLOBAL - (char *) 0;
1407 port->notify_pending = 0;
1408 port->data = (void_ptr) 0;
1409 port->info.sends = 0;
1410 port->info.receives = 0;
1412 P_Unlock(port);
1419 aport_port(port_id,port)
1421 aport_t * port;
1428 if (!port) return(AMSG_INVAL);
1431 port->aport_id = port_id;
1432 port->bport_id = Bport_Id(port_id);
1433 bret = bport_port(port->bport_id,&bport);
1435 port->bdomain_id = bport.bdomain_id;
1494 port_t * port;
1505 GetPort(port_id,&port);
1506 if (!port) return(AMSG_NOPORT);
1508 P_Lock(port);
1515 P_Unlock(port);
1518 if (((!port->notify_procedure) &&
1522 P_Unlock(port);
1525 if (val == port->notify)
1528 port->notify = 1;
1529 if (port->notify_pending) {
1530 level = port->notify_level;
1532 NF_Put(port);
1534 P_Unlock(port);
1541 port->notify = 0;
1542 if (port->notify_pending) {
1544 NF_Isolate(port);
1552 P_Unlock(port);
1555 port->notify_level = val;
1561 P_Unlock(port);
1564 port->notify_defer = val;
1567 port->data = (void_ptr) optval;
1570 P_Unlock(port);
1574 P_Unlock(port);
1586 port_t * port;
1595 GetPort(port_id,&port);
1596 if (!port) return(AMSG_NOPORT);
1598 P_Lock(port);
1602 *optval = (aport_optval_t) ((char *) 0 + port->notify);
1605 *optval = (aport_optval_t) ((char *) 0 + port->notify_level);
1608 *optval = (aport_optval_t) ((char *) 0 + port->notify_defer);
1611 *optval = (aport_optval_t) port->data;
1614 P_Unlock(port);
1619 P_Unlock(port);
1721 port_t * port;
1807 GetPort(port_id,&port);
1808 if (!port) return(AMSG_NOPORT);
1809 P_Lock(port);
1810 if (P_Empty(port)) {
1812 P_Put(port,AmsgBuffer(msg))
1813 if (port->notify_procedure) {
1814 port->notify_pending = 1;
1815 if (port->notify) {
1816 level = port->notify_level;
1818 NF_Put(port);
1820 P_Unlock(port);
1825 P_Unlock(port);
1828 P_Unlock(port);
1832 P_Put(port,AmsgBuffer(msg));
1833 P_Unlock(port);
1852 port_t * port;
1860 GetPort(port_id,&port);
1861 if (!port) return(AMSG_NOPORT);
1863 P_Lock(port);
1865 if (P_Empty(port)) {
1866 P_Unlock(port);
1870 P_Get(port,(amsg_buffer_scratch_t * *) &amsg);
1873 if (port->notify_pending) {
1874 port->notify_pending = 0;
1875 if (port->notify) {
1877 NF_Isolate(port);
1881 P_Unlock(port);
1906 port_t * port;
1915 GetPort(port_id,&port);
1916 if (!port) return(AMSG_NOPORT);
1918 P_Lock(port);
1920 if (P_Empty(port)) {
1921 P_Unlock(port);
1925 P_Peek(port,(amsg_buffer_scratch_t * *) &amsg);
1934 P_Unlock(port);
1962 unsigned size; /* in: # ports in default port set */
1963 void (* notify_procedure []) (); /* in: port notify procedures */
1964 aport_id_t port_id []; /* out: port identifiers */
1991 /* initialise port set */
2035 port_t * port;
2047 port = &ports[i];
2048 P_Lock(port);
2049 if (port->notify) {
2050 port->notify = 0;
2051 if (port->notify_pending) {
2053 NF_Isolate(port);
2057 P_Unlock(port);
2062 port = &static_ports[i];
2063 P_Lock(port);
2064 if (!P_Empty(port)) {
2065 P_Unlock(port);
2066 amsg_warn(AMSG_WEP_WARN,port->aport_id);
2069 P_Unlock(port);
2074 port = &dynamic_ports[i];
2075 P_Lock(port);
2076 if (port->aport_id && !P_Empty(port)) {
2077 port_id = port->aport_id;
2078 P_Unlock(port);
2082 P_Unlock(port);
2121 port_t * port;
2130 GetPort(port_id,&port);
2131 if (!port) return(AMSG_NOPORT);
2133 P_Lock(port);
2134 info->sends = port->info.sends;
2135 info->receives = port->info.receives;
2136 P_Unlock(port);
2155 port_t * port;
2228 GetPort(AmsgHeader(bmsg)->aport_id,&port);
2229 if (!port) {
2234 P_Lock(port); /* ensure message ordering on specific aport */
2236 if (P_Empty(port)) {
2237 P_Put(port,AmsgBuffer(bmsg));
2238 if (port->notify_procedure) {
2239 port->notify_pending = 1;
2240 if (port->notify) {
2241 if (port->notify_level > level)
2242 level = port->notify_level;
2244 NF_Put(port);
2250 P_Put(port,AmsgBuffer(bmsg));
2252 P_Unlock(port);
2264 "No such port !",
2266 "No port owner !",
2267 "No port send rights !",
2268 "No port receive rights !",
2269 "No port rights !",