- Timestamp:
- Jun 30, 2009 10:58:18 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/types.h
r20740 r21106 516 516 /** HC Natural signed integer. 517 517 * @deprecated silly type. */ 518 typedef int32_t RTHCINT;518 typedef int32_t RTHCINT; 519 519 /** Pointer to HC Natural signed integer. 520 520 * @deprecated silly type. */ 521 typedef RTHCINT *PRTHCINT;521 typedef RTHCINT *PRTHCINT; 522 522 /** Pointer to const HC Natural signed integer. 523 523 * @deprecated silly type. */ 524 typedef const RTHCINT *PCRTHCINT;524 typedef const RTHCINT *PCRTHCINT; 525 525 526 526 /** HC Natural unsigned integer. 527 527 * @deprecated silly type. */ 528 typedef uint32_t RTHCUINT;528 typedef uint32_t RTHCUINT; 529 529 /** Pointer to HC Natural unsigned integer. 530 530 * @deprecated silly type. */ 531 typedef RTHCUINT *PRTHCUINT;531 typedef RTHCUINT *PRTHCUINT; 532 532 /** Pointer to const HC Natural unsigned integer. 533 533 * @deprecated silly type. */ 534 typedef const RTHCUINT *PCRTHCUINT;534 typedef const RTHCUINT *PCRTHCUINT; 535 535 536 536 537 537 /** Signed integer which can contain a HC pointer. */ 538 538 #if HC_ARCH_BITS == 32 539 typedef int32_t RTHCINTPTR;539 typedef int32_t RTHCINTPTR; 540 540 #elif HC_ARCH_BITS == 64 541 typedef int64_t RTHCINTPTR;542 #else 543 # 541 typedef int64_t RTHCINTPTR; 542 #else 543 # error Unsupported HC_ARCH_BITS value. 544 544 #endif 545 545 /** Pointer to signed integer which can contain a HC pointer. */ 546 typedef RTHCINTPTR *PRTHCINTPTR;546 typedef RTHCINTPTR *PRTHCINTPTR; 547 547 /** Pointer to const signed integer which can contain a HC pointer. */ 548 typedef const RTHCINTPTR *PCRTHCINTPTR; 548 typedef const RTHCINTPTR *PCRTHCINTPTR; 549 /** Max RTHCINTPTR value. */ 550 #if HC_ARCH_BITS == 32 551 # define RTHCINTPTR_MAX INT32_MAX 552 #else 553 # define RTHCINTPTR_MAX INT64_MAX 554 #endif 555 /** Min RTHCINTPTR value. */ 556 #if HC_ARCH_BITS == 32 557 # define RTHCINTPTR_MIN INT32_MIN 558 #else 559 # define RTHCINTPTR_MIN INT64_MIN 560 #endif 549 561 550 562 /** Signed integer which can contain a HC ring-3 pointer. */ 551 563 #if R3_ARCH_BITS == 32 552 typedef int32_t RTR3INTPTR;564 typedef int32_t RTR3INTPTR; 553 565 #elif R3_ARCH_BITS == 64 554 typedef int64_t RTR3INTPTR;566 typedef int64_t RTR3INTPTR; 555 567 #else 556 568 # error Unsupported R3_ARCH_BITS value. 557 569 #endif 558 570 /** Pointer to signed integer which can contain a HC ring-3 pointer. */ 559 typedef RTR3INTPTR *PRTR3INTPTR;571 typedef RTR3INTPTR *PRTR3INTPTR; 560 572 /** Pointer to const signed integer which can contain a HC ring-3 pointer. */ 561 typedef const RTR3INTPTR *PCRTR3INTPTR; 573 typedef const RTR3INTPTR *PCRTR3INTPTR; 574 /** Max RTR3INTPTR value. */ 575 #if R3_ARCH_BITS == 32 576 # define RTR3INTPTR_MAX INT32_MAX 577 #else 578 # define RTR3INTPTR_MAX INT64_MAX 579 #endif 580 /** Min RTR3INTPTR value. */ 581 #if R3_ARCH_BITS == 32 582 # define RTR3INTPTR_MIN INT32_MIN 583 #else 584 # define RTR3INTPTR_MIN INT64_MIN 585 #endif 562 586 563 587 /** Signed integer which can contain a HC ring-0 pointer. */ 564 588 #if R0_ARCH_BITS == 32 565 typedef int32_t RTR0INTPTR;589 typedef int32_t RTR0INTPTR; 566 590 #elif R0_ARCH_BITS == 64 567 typedef int64_t RTR0INTPTR;568 #else 569 # 591 typedef int64_t RTR0INTPTR; 592 #else 593 # error Unsupported R0_ARCH_BITS value. 570 594 #endif 571 595 /** Pointer to signed integer which can contain a HC ring-0 pointer. */ 572 typedef RTR0INTPTR *PRTR0INTPTR;596 typedef RTR0INTPTR *PRTR0INTPTR; 573 597 /** Pointer to const signed integer which can contain a HC ring-0 pointer. */ 574 typedef const RTR0INTPTR *PCRTR0INTPTR; 598 typedef const RTR0INTPTR *PCRTR0INTPTR; 599 /** Max RTR0INTPTR value. */ 600 #if R0_ARCH_BITS == 32 601 # define RTR0INTPTR_MAX INT32_MAX 602 #else 603 # define RTR0INTPTR_MAX INT64_MAX 604 #endif 605 /** Min RTHCINTPTR value. */ 606 #if R0_ARCH_BITS == 32 607 # define RTR0INTPTR_MIN INT32_MIN 608 #else 609 # define RTR0INTPTR_MIN INT64_MIN 610 #endif 575 611 576 612 577 613 /** Unsigned integer which can contain a HC pointer. */ 578 614 #if HC_ARCH_BITS == 32 579 typedef uint32_t RTHCUINTPTR;615 typedef uint32_t RTHCUINTPTR; 580 616 #elif HC_ARCH_BITS == 64 581 typedef uint64_t RTHCUINTPTR;582 #else 583 # 617 typedef uint64_t RTHCUINTPTR; 618 #else 619 # error Unsupported HC_ARCH_BITS value. 584 620 #endif 585 621 /** Pointer to unsigned integer which can contain a HC pointer. */ 586 typedef RTHCUINTPTR *PRTHCUINTPTR;622 typedef RTHCUINTPTR *PRTHCUINTPTR; 587 623 /** Pointer to unsigned integer which can contain a HC pointer. */ 588 typedef const RTHCUINTPTR *PCRTHCUINTPTR; 624 typedef const RTHCUINTPTR *PCRTHCUINTPTR; 625 /** Max RTHCUINTTPR value. */ 626 #if HC_ARCH_BITS == 32 627 # define RTHCUINTPTR_MAX UINT32_MAX 628 #else 629 # define RTHCUINTPTR_MAX UINT64_MAX 630 #endif 589 631 590 632 /** Unsigned integer which can contain a HC ring-3 pointer. */ 591 633 #if R3_ARCH_BITS == 32 592 typedef uint32_t RTR3UINTPTR;634 typedef uint32_t RTR3UINTPTR; 593 635 #elif R3_ARCH_BITS == 64 594 typedef uint64_t RTR3UINTPTR;595 #else 596 # 636 typedef uint64_t RTR3UINTPTR; 637 #else 638 # error Unsupported R3_ARCH_BITS value. 597 639 #endif 598 640 /** Pointer to unsigned integer which can contain a HC ring-3 pointer. */ 599 typedef RTR3UINTPTR *PRTR3UINTPTR;641 typedef RTR3UINTPTR *PRTR3UINTPTR; 600 642 /** Pointer to unsigned integer which can contain a HC ring-3 pointer. */ 601 typedef const RTR3UINTPTR *PCRTR3UINTPTR; 643 typedef const RTR3UINTPTR *PCRTR3UINTPTR; 644 /** Max RTHCUINTTPR value. */ 645 #if R3_ARCH_BITS == 32 646 # define RTR3UINTPTR_MAX UINT32_MAX 647 #else 648 # define RTR3UINTPTR_MAX UINT64_MAX 649 #endif 602 650 603 651 /** Unsigned integer which can contain a HC ring-0 pointer. */ 604 652 #if R0_ARCH_BITS == 32 605 typedef uint32_t RTR0UINTPTR;653 typedef uint32_t RTR0UINTPTR; 606 654 #elif R0_ARCH_BITS == 64 607 typedef uint64_t RTR0UINTPTR;608 #else 609 # 655 typedef uint64_t RTR0UINTPTR; 656 #else 657 # error Unsupported R0_ARCH_BITS value. 610 658 #endif 611 659 /** Pointer to unsigned integer which can contain a HC ring-0 pointer. */ 612 typedef RTR0UINTPTR *PRTR0UINTPTR;660 typedef RTR0UINTPTR *PRTR0UINTPTR; 613 661 /** Pointer to unsigned integer which can contain a HC ring-0 pointer. */ 614 typedef const RTR0UINTPTR *PCRTR0UINTPTR; 662 typedef const RTR0UINTPTR *PCRTR0UINTPTR; 663 /** Max RTR0UINTTPR value. */ 664 #if HC_ARCH_BITS == 32 665 # define RTR0UINTPTR_MAX UINT32_MAX 666 #else 667 # define RTR0UINTPTR_MAX UINT64_MAX 668 #endif 615 669 616 670 617 671 /** Host Physical Memory Address. */ 618 typedef uint64_t RTHCPHYS;672 typedef uint64_t RTHCPHYS; 619 673 /** Pointer to Host Physical Memory Address. */ 620 typedef RTHCPHYS *PRTHCPHYS;674 typedef RTHCPHYS *PRTHCPHYS; 621 675 /** Pointer to const Host Physical Memory Address. */ 622 typedef const RTHCPHYS *PCRTHCPHYS;676 typedef const RTHCPHYS *PCRTHCPHYS; 623 677 /** @def NIL_RTHCPHYS 624 678 * NIL HC Physical Address. … … 626 680 * to the NULL pointer. 627 681 */ 628 #define NIL_RTHCPHYS (~(RTHCPHYS)0) 682 #define NIL_RTHCPHYS (~(RTHCPHYS)0) 683 /** Max RTHCPHYS value. */ 684 #define RTHCPHYS_MAX UINT64_MAX 629 685 630 686 631 687 /** HC pointer. */ 632 688 #ifndef IN_RC 633 typedef void * RTHCPTR;634 #else 635 typedef RTHCUINTPTR RTHCPTR;689 typedef void * RTHCPTR; 690 #else 691 typedef RTHCUINTPTR RTHCPTR; 636 692 #endif 637 693 /** Pointer to HC pointer. */ 638 typedef RTHCPTR *PRTHCPTR;694 typedef RTHCPTR *PRTHCPTR; 639 695 /** Pointer to const HC pointer. */ 640 typedef const RTHCPTR *PCRTHCPTR;696 typedef const RTHCPTR *PCRTHCPTR; 641 697 /** @def NIL_RTHCPTR 642 698 * NIL HC pointer. 643 699 */ 644 #define NIL_RTHCPTR ((RTHCPTR)0) 700 #define NIL_RTHCPTR ((RTHCPTR)0) 701 /** Max RTHCPTR value. */ 702 #define RTHCPTR_MAX ((RTHCPTR)RTHCUINTPTR_MAX) 703 645 704 646 705 /** HC ring-3 pointer. */ 647 706 #ifdef IN_RING3 648 typedef void * RTR3PTR;649 #else 650 typedef RTR3UINTPTR RTR3PTR;707 typedef void * RTR3PTR; 708 #else 709 typedef RTR3UINTPTR RTR3PTR; 651 710 #endif 652 711 /** Pointer to HC ring-3 pointer. */ 653 typedef RTR3PTR *PRTR3PTR;712 typedef RTR3PTR *PRTR3PTR; 654 713 /** Pointer to const HC ring-3 pointer. */ 655 typedef const RTR3PTR *PCRTR3PTR;714 typedef const RTR3PTR *PCRTR3PTR; 656 715 /** @def NIL_RTR3PTR 657 716 * NIL HC ring-3 pointer. 658 717 */ 659 #define NIL_RTR3PTR ((RTR3PTR)0) 718 #define NIL_RTR3PTR ((RTR3PTR)0) 719 /** Max RTR3PTR value. */ 720 #define RTR3PTR_MAX ((RTR3PTR)RTR3UINTPTR_MAX) 660 721 661 722 /** HC ring-0 pointer. */ 662 723 #ifdef IN_RING0 663 typedef void * RTR0PTR;664 #else 665 typedef RTR0UINTPTR RTR0PTR;724 typedef void * RTR0PTR; 725 #else 726 typedef RTR0UINTPTR RTR0PTR; 666 727 #endif 667 728 /** Pointer to HC ring-0 pointer. */ 668 typedef RTR0PTR *PRTR0PTR;729 typedef RTR0PTR *PRTR0PTR; 669 730 /** Pointer to const HC ring-0 pointer. */ 670 typedef const RTR0PTR *PCRTR0PTR;731 typedef const RTR0PTR *PCRTR0PTR; 671 732 /** @def NIL_RTR0PTR 672 733 * NIL HC ring-0 pointer. 673 734 */ 674 #define NIL_RTR0PTR ((RTR0PTR)0) 735 #define NIL_RTR0PTR ((RTR0PTR)0) 736 /** Max RTR3PTR value. */ 737 #define RTR0PTR_MAX ((RTR0PTR)RTR0UINTPTR_MAX) 675 738 676 739 … … 789 852 790 853 /** Guest Physical Memory Address.*/ 791 typedef uint64_t RTGCPHYS;854 typedef uint64_t RTGCPHYS; 792 855 /** Pointer to Guest Physical Memory Address. */ 793 typedef RTGCPHYS *PRTGCPHYS;856 typedef RTGCPHYS *PRTGCPHYS; 794 857 /** Pointer to const Guest Physical Memory Address. */ 795 typedef const RTGCPHYS *PCRTGCPHYS;858 typedef const RTGCPHYS *PCRTGCPHYS; 796 859 /** @def NIL_RTGCPHYS 797 860 * NIL GC Physical Address. … … 800 863 * some contexts. 801 864 */ 802 #define NIL_RTGCPHYS (~(RTGCPHYS)0U) 865 #define NIL_RTGCPHYS (~(RTGCPHYS)0U) 866 /** Max guest physical memory address value. */ 867 #define RTGCPHYS_MAX UINT64_MAX 803 868 804 869 805 870 /** Guest Physical Memory Address; limited to 32 bits.*/ 806 typedef uint32_t RTGCPHYS32;871 typedef uint32_t RTGCPHYS32; 807 872 /** Pointer to Guest Physical Memory Address. */ 808 typedef RTGCPHYS32 *PRTGCPHYS32;873 typedef RTGCPHYS32 *PRTGCPHYS32; 809 874 /** Pointer to const Guest Physical Memory Address. */ 810 typedef const RTGCPHYS32 *PCRTGCPHYS32;875 typedef const RTGCPHYS32 *PCRTGCPHYS32; 811 876 /** @def NIL_RTGCPHYS32 812 877 * NIL GC Physical Address. … … 867 932 typedef PRTGCPTR64 PRTGCPTR; 868 933 /** Pointer to a const guest context pointer. */ 869 typedef PCRTGCPTR64 PCRTGCPTR;934 typedef PCRTGCPTR64 PCRTGCPTR; 870 935 /** @def NIL_RTGCPTR 871 936 * NIL GC pointer. 872 937 */ 873 #define NIL_RTGCPTR NIL_RTGCPTR64 938 # define NIL_RTGCPTR NIL_RTGCPTR64 939 /** Max RTGCPTR value. */ 940 # define RTGCPTR_MAX UINT64_MAX 874 941 #elif GC_ARCH_BITS == 32 875 942 typedef RTGCPTR32 RTGCPTR; … … 877 944 typedef PRTGCPTR32 PRTGCPTR; 878 945 /** Pointer to a const guest context pointer. */ 879 typedef PCRTGCPTR32 PCRTGCPTR;946 typedef PCRTGCPTR32 PCRTGCPTR; 880 947 /** @def NIL_RTGCPTR 881 948 * NIL GC pointer. 882 949 */ 883 #define NIL_RTGCPTR NIL_RTGCPTR32 950 # define NIL_RTGCPTR NIL_RTGCPTR32 951 /** Max RTGCPTR value. */ 952 # define RTGCPTR_MAX UINT32_MAX 884 953 #else 885 954 # error "Unsupported GC_ARCH_BITS!" … … 900 969 901 970 #if GC_ARCH_BITS == 64 902 typedef RTGCUINTREG64 RTGCUINTREG;971 typedef RTGCUINTREG64 RTGCUINTREG; 903 972 #elif GC_ARCH_BITS == 32 904 typedef RTGCUINTREG32 RTGCUINTREG;973 typedef RTGCUINTREG32 RTGCUINTREG; 905 974 #else 906 975 # error "Unsupported GC_ARCH_BITS!" 907 976 #endif 908 977 /** Pointer to an unsigned integer register in the guest context. */ 909 typedef RTGCUINTREG *PRTGCUINTREG;978 typedef RTGCUINTREG *PRTGCUINTREG; 910 979 /** Pointer to a const unsigned integer register in the guest context. */ 911 typedef const RTGCUINTREG *PCRTGCUINTREG;980 typedef const RTGCUINTREG *PCRTGCUINTREG; 912 981 913 982 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.