/usr/include/rtai/rtai_msg.h is in librtai-dev 3.9.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 | /*
* Copyright (C) 2002 POSEIDON CONTROLS INC <pcloutier@poseidoncontrols.com>
* Paolo Mantegazza <mantegazza@aero.polimi.it>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _RTAI_MSG_H
#define _RTAI_MSG_H
#include <rtai_types.h>
#define MSG_ERR ((RT_TASK *)RTE_OBJINV)
struct rt_task_struct;
struct QueueBlock;
struct QueueHook;
#ifdef __KERNEL__
typedef struct t_msgcb { /* Message control block structure. */
int cmd;
void *sbuf;
size_t sbytes;
void *rbuf;
size_t rbytes;
} MSGCB;
#define PROXY_MIN_STACK_SIZE 2048
struct proxy_t {
struct rt_task_struct *receiver;
int nmsgs,
nbytes;
char *msg;
};
#define SYNCMSG 0
#define PROXY -1
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
int __rtai_msg_init(void);
void __rtai_msg_exit(void);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_send(struct rt_task_struct *task,
unsigned long msg);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_send_if(struct rt_task_struct *task,
unsigned long msg);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_send_until(struct rt_task_struct *task,
unsigned long msg,
RTIME time);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_send_timed(struct rt_task_struct *task,
unsigned long msg,
RTIME delay);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_evdrp(struct rt_task_struct *task,
void *msg);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_receive(struct rt_task_struct *task,
void *msg);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_receive_if(struct rt_task_struct *task,
void *msg);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_receive_until(struct rt_task_struct *task,
void *msg,
RTIME time);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_receive_timed(struct rt_task_struct *task,
void *msg,
RTIME delay);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_rpc(struct rt_task_struct *task,
unsigned long to_do,
void *result);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_rpc_if(struct rt_task_struct *task,
unsigned long to_do,
void *result);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_rpc_until(struct rt_task_struct *task,
unsigned long to_do,
void *result,
RTIME time);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_rpc_timed(struct rt_task_struct *task,
unsigned long to_do,
void *result,
RTIME delay);
RTAI_SYSCALL_MODE int rt_isrpc(struct rt_task_struct *task);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_return(struct rt_task_struct *task,
unsigned long result);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_rpcx(struct rt_task_struct *task,
void *smsg,
void *rmsg,
int ssize,
int rsize);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_rpcx_if(struct rt_task_struct *task,
void *smsg,
void *rmsg,
int ssize,
int rsize);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_rpcx_until(struct rt_task_struct *task,
void *smsg,
void *rmsg,
int ssize,
int rsize,
RTIME time);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_rpcx_timed(struct rt_task_struct *task,
void *smsg,
void *rmsg,
int ssize,
int rsize,
RTIME delay);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_sendx(struct rt_task_struct *task,
void *msg,
int size);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_sendx_if(struct rt_task_struct *task,
void *msg,
int size);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_sendx_until(struct rt_task_struct *task,
void *msg,
int size,
RTIME time);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_sendx_timed(struct rt_task_struct *task,
void *msg,
int size,
RTIME delay);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_returnx(struct rt_task_struct *task,
void *msg,
int size);
#define rt_isrpcx(task) rt_isrpc(task)
RTAI_SYSCALL_MODE struct rt_task_struct *rt_evdrpx(struct rt_task_struct *task,
void *msg,
int size,
long *len);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_receivex(struct rt_task_struct *task,
void *msg,
int size,
long *len);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_receivex_if(struct rt_task_struct *task,
void *msg,
int size,
long *len);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_receivex_until(struct rt_task_struct *task,
void *msg,
int size,
long *len,
RTIME time);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_receivex_timed(struct rt_task_struct *task,
void *msg,
int size,
long *len,
RTIME delay);
struct rt_task_struct *__rt_proxy_attach(void (*func)(long),
struct rt_task_struct *task,
void *msg,
int nbytes,
int priority);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_proxy_attach(struct rt_task_struct *task,
void *msg,
int nbytes,
int priority);
RTAI_SYSCALL_MODE int rt_proxy_detach(struct rt_task_struct *proxy);
RTAI_SYSCALL_MODE struct rt_task_struct *rt_trigger(struct rt_task_struct *proxy);
#define exist(name) rt_get_adr(nam2num(name))
RTAI_SYSCALL_MODE int rt_Send(pid_t pid,
void *smsg,
void *rmsg,
size_t ssize,
size_t rsize);
RTAI_SYSCALL_MODE pid_t rt_Receive(pid_t pid,
void *msg,
size_t maxsize,
size_t *msglen);
RTAI_SYSCALL_MODE pid_t rt_Creceive(pid_t pid,
void *msg,
size_t maxsize,
size_t *msglen,
RTIME delay);
RTAI_SYSCALL_MODE int rt_Reply(pid_t pid,
void *msg,
size_t size);
RTAI_SYSCALL_MODE pid_t rt_Proxy_attach(pid_t pid,
void *msg,
int nbytes,
int priority);
RTAI_SYSCALL_MODE int rt_Proxy_detach(pid_t pid);
RTAI_SYSCALL_MODE pid_t rt_Trigger(pid_t pid);
RTAI_SYSCALL_MODE pid_t rt_Name_attach(const char *name);
RTAI_SYSCALL_MODE pid_t rt_Name_locate(const char *host,
const char *name);
RTAI_SYSCALL_MODE int rt_Name_detach(pid_t pid);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#else /* !__KERNEL__ */
#include <rtai_lxrt.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
RTAI_PROTO(struct rt_task_struct *,rt_send,(struct rt_task_struct *task, unsigned long msg))
{
struct { struct rt_task_struct *task; unsigned long msg; } arg = { task, msg };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, SENDMSG, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_send_if,(struct rt_task_struct *task, unsigned long msg))
{
struct { struct rt_task_struct *task; unsigned long msg; } arg = { task, msg };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, SEND_IF, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_send_until,(struct rt_task_struct *task, unsigned long msg, RTIME time))
{
struct { struct rt_task_struct *task; unsigned long msg; RTIME time; } arg = { task, msg, time };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, SEND_UNTIL, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_send_timed,(struct rt_task_struct *task, unsigned long msg, RTIME delay))
{
struct { struct rt_task_struct *task; unsigned long msg; RTIME delay; } arg = { task, msg, delay };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, SEND_TIMED, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_evdrp,(struct rt_task_struct *task, void *msg))
{
struct { struct rt_task_struct *task; void *msg; } arg = { task, msg };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, EVDRP, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_receive,(struct rt_task_struct *task, void *msg))
{
struct { struct rt_task_struct *task; void *msg; } arg = { task, msg };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RECEIVEMSG, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_receive_if,(struct rt_task_struct *task, void *msg))
{
struct { struct rt_task_struct *task; void *msg; } arg = { task, msg };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RECEIVE_IF, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_receive_until,(struct rt_task_struct *task, void *msg, RTIME time))
{
struct { struct rt_task_struct *task; void *msg; RTIME time; } arg = { task, msg, time };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RECEIVE_UNTIL, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_receive_timed,(struct rt_task_struct *task, void *msg, RTIME delay))
{
struct { struct rt_task_struct *task; void *msg; RTIME delay; } arg = { task, msg, delay };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RECEIVE_TIMED, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_rpc,(struct rt_task_struct *task, unsigned long to_do, void *result))
{
struct { struct rt_task_struct *task; unsigned long to_do; void *result; } arg = { task, to_do, result };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RPCMSG, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_rpc_if,(struct rt_task_struct *task, unsigned long to_do, void *result))
{
struct { struct rt_task_struct *task; unsigned long to_do; void *result; } arg = { task, to_do, result };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RPC_IF, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_rpc_until,(struct rt_task_struct *task, unsigned long to_do, void *result, RTIME time))
{
struct { struct rt_task_struct *task; unsigned long to_do; void *result; RTIME time; } arg = { task, to_do, result, time };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RPC_UNTIL, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_rpc_timed,(struct rt_task_struct *task, unsigned long to_do, void *result, RTIME delay))
{
struct { struct rt_task_struct *task; unsigned long to_do; void *result; RTIME delay; } arg = { task, to_do, result, delay };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RPC_TIMED, &arg).v[LOW];
}
RTAI_PROTO(int, rt_isrpc,(struct rt_task_struct *task))
{
struct { struct rt_task_struct *task; } arg = { task };
return (int)rtai_lxrt(BIDX, SIZARG, ISRPC, &arg).i[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_return,(struct rt_task_struct *task, unsigned long result))
{
struct { struct rt_task_struct *task; unsigned long result; } arg = { task, result };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RETURNMSG, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_rpcx,(struct rt_task_struct *task, void *smsg, void *rmsg, int ssize, int rsize))
{
struct { struct rt_task_struct *task; void *smsg; void *rmsg; long ssize; long rsize; } arg = { task, smsg, rmsg, ssize, rsize };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RPCX, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_rpcx_if,(struct rt_task_struct *task, void *smsg, void *rmsg, int ssize, int rsize))
{
struct { struct rt_task_struct *task; void *smsg; void *rmsg; long ssize; long rsize; } arg = { task, smsg, rmsg, ssize, rsize };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RPCX_IF, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_rpcx_until,(struct rt_task_struct *task, void *smsg, void *rmsg, int ssize, int rsize, RTIME time))
{
struct { struct rt_task_struct *task; void *smsg; void *rmsg; long ssize; long rsize; RTIME time; } arg = { task, smsg, rmsg, ssize, rsize, time };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RPCX_UNTIL, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_rpcx_timed,(struct rt_task_struct *task, void *smsg, void *rmsg, int ssize, int rsize, RTIME delay))
{
struct { struct rt_task_struct *task; void *smsg; void *rmsg; long ssize; long rsize; RTIME delay; } arg = { task, smsg, rmsg, ssize, rsize, delay };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RPCX_TIMED, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_sendx,(struct rt_task_struct *task, void *msg, int size))
{
struct { struct rt_task_struct *task; void *msg; long size; } arg = { task, msg, size };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, SENDX, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_sendx_if,(struct rt_task_struct *task, void *msg, int size))
{
struct { struct rt_task_struct *task; void *msg; long size; } arg = { task, msg, size };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, SENDX_IF, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_sendx_until,(struct rt_task_struct *task, void *msg, int size, RTIME time))
{
struct { struct rt_task_struct *task; void *msg; long size; RTIME time; } arg = { task, msg, size, time };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, SENDX_UNTIL, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_sendx_timed,(struct rt_task_struct *task, void *msg, long size, RTIME delay))
{
struct { struct rt_task_struct *task; void *msg; long size; RTIME delay; } arg = { task, msg, size, delay };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, SENDX_TIMED, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_returnx,(struct rt_task_struct *task, void *msg, int size))
{
struct { struct rt_task_struct *task; void *msg; long size; } arg = { task, msg, size };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RETURNX, &arg).v[LOW];
}
#define rt_isrpcx(task) rt_isrpc(task)
RTAI_PROTO(struct rt_task_struct *,rt_evdrpx,(struct rt_task_struct *task, void *msg, int size, long *len))
{
struct { struct rt_task_struct *task; void *msg; long size; long *len; } arg = { task, msg, size, len };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, EVDRPX, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_receivex,(struct rt_task_struct *task, void *msg, int size, long *len))
{
struct { struct rt_task_struct *task; void *msg; long size; long *len; } arg = { task, msg, size, len };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RECEIVEX, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_receivex_if,(struct rt_task_struct *task, void *msg, int size, long *len))
{
struct { struct rt_task_struct *task; void *msg; long size; long *len; } arg = { task, msg, size, len };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RECEIVEX_IF, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_receivex_until,(struct rt_task_struct *task, void *msg, int size, long *len, RTIME time))
{
struct { struct rt_task_struct *task; void *msg; long size; long *len; RTIME time; } arg = { task, msg, size, len, time };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RECEIVEX_UNTIL, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_receivex_timed,(struct rt_task_struct *task, void *msg, int size, long *len, RTIME delay))
{
struct { struct rt_task_struct *task; void *msg; long size; long *len; RTIME delay; } arg = { task, msg, size, len, delay };
return (struct rt_task_struct *)rtai_lxrt(BIDX, SIZARG, RECEIVEX_TIMED, &arg).v[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_proxy_attach,(struct rt_task_struct *proxy, void *msg, int nbytes, int priority))
{
struct { struct rt_task_struct *proxy; void *msg; long nbytes, priority;} arg = { proxy, msg, nbytes, priority };
return (struct rt_task_struct *) rtai_lxrt(BIDX, SIZARG, PROXY_ATTACH, &arg).v[LOW];
}
RTAI_PROTO(int, rt_proxy_detach,(struct rt_task_struct *proxy))
{
struct { struct rt_task_struct *proxy; } arg = { proxy };
return (pid_t) rtai_lxrt(BIDX, SIZARG, PROXY_DETACH, &arg).i[LOW];
}
RTAI_PROTO(struct rt_task_struct *,rt_trigger,(struct rt_task_struct *proxy))
{
struct { struct rt_task_struct *proxy; } arg = { proxy };
return (struct rt_task_struct *) rtai_lxrt(BIDX, SIZARG, PROXY_TRIGGER, &arg).v[LOW];
}
RTAI_PROTO(int, rt_Send,(pid_t pid, void *smsg, void *rmsg, size_t ssize, size_t rsize ))
{
struct { long pid; void *smsg; void *rmsg; long ssize, rsize;} arg = { pid, smsg, rmsg, ssize, rsize };
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_SEND, &arg).i[LOW];
}
RTAI_PROTO(pid_t, rt_Receive,(pid_t pid, void *msg, size_t maxsize, size_t *msglen))
{
struct { long pid; void *msg; long maxsize; size_t *msglen; } arg = { pid, msg, maxsize, msglen };
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_RECEIVE, &arg).i[LOW];
}
RTAI_PROTO(pid_t, rt_Creceive,(pid_t pid, void *msg, size_t maxsize, size_t *msglen, RTIME delay))
{
struct { long pid; void *msg; long maxsize; size_t *msglen; RTIME delay;} arg = { pid, msg, maxsize, msglen, delay };
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_CRECEIVE, &arg).i[LOW];
}
RTAI_PROTO(pid_t, rt_Reply,(pid_t pid, void *msg, size_t size))
{
struct { long pid; void *msg; long size;} arg = { pid, msg, size };
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_REPLY, &arg).i[LOW];
}
RTAI_PROTO(pid_t, rt_Proxy_attach,(pid_t pid, void *msg, int nbytes, int priority))
{
struct { long pid; void *msg; long nbytes, priority;} arg = { pid, msg, nbytes, priority };
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_PROXY_ATTACH, &arg).i[LOW];
}
RTAI_PROTO(pid_t, rt_Proxy_detach,(pid_t pid))
{
struct { long pid; } arg = { pid };
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_PROXY_DETACH, &arg).i[LOW];
}
RTAI_PROTO(pid_t, rt_Trigger,(pid_t pid))
{
struct { long pid; } arg = { pid };
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_TRIGGER, &arg).i[LOW];
}
RTAI_PROTO(pid_t, rt_Alias_attach,(const char *name))
{
struct { const char *name; } arg = { name};
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_NAME_ATTACH, &arg).i[LOW];
}
RTAI_PROTO(pid_t, rt_Name_locate,(const char *host, const char *name))
{
struct { const char *host, *name; } arg = { host, name };
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_NAME_LOCATE, &arg).i[LOW];
}
RTAI_PROTO(int, rt_Name_detach,(pid_t pid))
{
struct { long pid; } arg = { pid };
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_NAME_DETACH, &arg).i[LOW];
}
RTAI_PROTO(int, rt_InitTickQueue,(void))
{
struct { unsigned long dummy; } arg;
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_INITTICKQUEUE, &arg).i[LOW];
}
RTAI_PROTO(void, rt_ReleaseTickQueue,(void))
{
struct { unsigned long dummy; } arg;
rtai_lxrt(BIDX, SIZARG, RT_RELEASETICKQUEUE, &arg);
}
RTAI_PROTO(unsigned long, rt_qDynAlloc,(unsigned long n))
{
struct { unsigned long n; } arg = { n };
return (unsigned long) rtai_lxrt(BIDX, SIZARG, RT_QDYNALLOC, &arg).i[LOW];
}
RTAI_PROTO(unsigned long, rt_qDynFree,(int n))
{
struct { unsigned long n; } arg = { n };
return (unsigned long) rtai_lxrt(BIDX, SIZARG, RT_QDYNFREE, &arg).i[LOW];
}
RTAI_PROTO(struct QueueBlock *,rt_qDynInit,(struct QueueBlock **q, void (*fun)(void *, int), void *data, int evn ))
{
struct QueueBlock *r;
struct { struct QueueBlock **q; void (*fun)(void *, int), *data; long evn; } arg = { 0, fun, data, evn };
r = (struct QueueBlock *) rtai_lxrt(BIDX, SIZARG, RT_QDYNINIT, &arg).v[LOW];
if (q) *q = r;
return r;
}
RTAI_PROTO(void, rt_qBlkWait,(struct QueueBlock *q, RTIME t))
{
struct { struct QueueBlock *q; RTIME t; } arg = { q, t } ;
rtai_lxrt(BIDX, SIZARG, RT_QBLKWAIT, &arg);
}
RTAI_PROTO(void, rt_qBlkRepeat,(struct QueueBlock *q, RTIME t))
{
struct { struct QueueBlock *q; RTIME t; } arg = { q, t } ;
rtai_lxrt(BIDX, SIZARG, RT_QBLKREPEAT, &arg);
}
RTAI_PROTO(void, rt_qBlkSoon,(struct QueueBlock *q))
{
struct { struct QueueBlock *q; } arg = { q };
rtai_lxrt(BIDX, SIZARG, RT_QBLKSOON, &arg);
}
RTAI_PROTO(void, rt_qBlkDequeue,(struct QueueBlock *q))
{
struct { struct QueueBlock *q; } arg = { q };
rtai_lxrt(BIDX, SIZARG, RT_QBLKDEQUEUE, &arg);
}
RTAI_PROTO(void, rt_qBlkCancel,(struct QueueBlock *q))
{
struct { struct QueueBlock *q; } arg = { q };
rtai_lxrt(BIDX, SIZARG, RT_QBLKCANCEL, &arg);
}
RTAI_PROTO(void, rt_qBlkBefore,(struct QueueBlock *cur, struct QueueBlock *nxt))
{
struct { struct QueueBlock *cur, *nxt; } arg = { cur, nxt };
rtai_lxrt(BIDX, SIZARG, RT_QBLKBEFORE, &arg);
}
RTAI_PROTO(void, rt_qBlkAfter,(struct QueueBlock *cur, struct QueueBlock *prv))
{
struct { struct QueueBlock *cur, *prv; } arg = { cur, prv };
rtai_lxrt(BIDX, SIZARG, RT_QBLKAFTER, &arg);
}
RTAI_PROTO(struct QueueBlock *,rt_qBlkUnhook,(struct QueueBlock *q))
{
struct { struct QueueBlock *q; } arg = { q };
return (struct QueueBlock *) rtai_lxrt(BIDX, SIZARG, RT_QBLKUNHOOK, &arg).v[LOW];
}
RTAI_PROTO(void, rt_qBlkRelease,(struct QueueBlock *q))
{
struct { struct QueueBlock *q; } arg = { q };
rtai_lxrt(BIDX, SIZARG, RT_QBLKRELEASE, &arg);
}
RTAI_PROTO(void, rt_qBlkComplete,(struct QueueBlock *q))
{
struct { struct QueueBlock *q; } arg = { q };
rtai_lxrt(BIDX, SIZARG, RT_QBLKCOMPLETE, &arg);
}
RTAI_PROTO(int, rt_qSync,(void))
{
struct { unsigned long long dummy; } arg;
return rtai_lxrt(BIDX, SIZARG, RT_QSYNC, &arg).i[LOW];
}
RTAI_PROTO(pid_t, rt_qReceive,(pid_t target, void *buf, size_t maxlen, size_t *msglen))
{
struct { long target; void *buf; long maxlen; size_t *msglen; } arg = { target, buf, maxlen, msglen };
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_QRECEIVE, &arg).i[LOW];
}
RTAI_PROTO(void, rt_qLoop,(void))
{
struct { unsigned long dummy; } arg;
rtai_lxrt(BIDX, SIZARG, RT_QLOOP, &arg);
}
RTAI_PROTO(RTIME, rt_qStep,(void))
{
struct { unsigned long dummy; } arg;
return rtai_lxrt(BIDX, SIZARG, RT_QSTEP, &arg).rt;
}
RTAI_PROTO(void, rt_qHookFlush,(struct QueueHook *h))
{
struct { struct QueueHook *h; } arg = { h };
rtai_lxrt(BIDX, SIZARG, RT_QHOOKFLUSH, &arg);
}
RTAI_PROTO(void, rt_qBlkAtHead,(struct QueueBlock *q, struct QueueHook *h))
{
struct { struct QueueBlock *q; struct QueueHook *h; } arg = { q, h };
rtai_lxrt(BIDX, SIZARG, RT_QBLKATHEAD, &arg);
}
RTAI_PROTO(void, rt_qBlkAtTail,(struct QueueBlock *q, struct QueueHook *h))
{
struct { struct QueueBlock *q; struct QueueHook *h; } arg = { q, h };
rtai_lxrt(BIDX, SIZARG, RT_QBLKATTAIL, &arg);
}
RTAI_PROTO(struct QueueHook *,rt_qHookInit,(struct QueueHook **h, void (*c)(void *, struct QueueBlock *), void *a))
{
struct QueueHook *r;
struct { struct QueueHook **h; void (*c)(void *, struct QueueBlock *), *a;} arg = { 0, c, a };
r = (struct QueueHook *) rtai_lxrt(BIDX, SIZARG, RT_QHOOKINIT, &arg).v[LOW];
if (h) *h = r;
return r;
}
RTAI_PROTO(void, rt_qHookRelease,(struct QueueHook *h))
{
struct { struct QueueHook *h; } arg = { h };
rtai_lxrt(BIDX, SIZARG, RT_QHOOKRELEASE, &arg);
}
RTAI_PROTO(void, rt_qBlkSchedule,(struct QueueBlock *q, RTIME t))
{
struct { struct QueueBlock *q; RTIME t; } arg = { q, t } ;
rtai_lxrt(BIDX, SIZARG, RT_QBLKSCHEDULE, &arg);
}
RTAI_PROTO(struct QueueHook *,rt_GetTickQueueHook,(void))
{
struct { unsigned long dummy; } arg;
return (struct QueueHook *) rtai_lxrt(BIDX, SIZARG, RT_GETTICKQUEUEHOOK, &arg).v[LOW];
}
RTAI_PROTO(pid_t, rt_vc_reserve,( void ))
{
struct { unsigned long dummy; } arg;
return (pid_t) rtai_lxrt(BIDX, SIZARG, RT_VC_RESERVE, &arg).i[LOW];
}
RTAI_PROTO(int, rt_vc_attach,(pid_t pid))
{
struct { long pid; } arg = { pid };
return rtai_lxrt(BIDX, SIZARG, RT_VC_ATTACH, &arg).i[LOW];
}
RTAI_PROTO(int, rt_vc_release,(pid_t pid))
{
struct { long pid; } arg = { pid };
return rtai_lxrt(BIDX, SIZARG, RT_VC_RELEASE, &arg).i[LOW];
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __KERNEL__ */
#if !defined(__KERNEL__) || defined(__cplusplus)
typedef struct t_msgcb {
int opaque;
} MSGCB;
#endif /* !__KERNEL__ || __cplusplus */
#endif /* !_RTAI_MSG_H */
|