Changeset 678 for trunk/libs/libalmosmkh/almosmkh.h
- Timestamp:
- Nov 20, 2020, 12:23:31 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libs/libalmosmkh/almosmkh.h
r661 r678 141 141 142 142 /*************************************************************************************** 143 * This syscall returns an 32 bits integer from the standard "stdin" stream.143 * This syscall returns an 32 bits integer from the TXT terminal. 144 144 * The value is copied in buffer pointed by the <buf> argument 145 145 * Both decimal numbers and hexadecimal numbers (prefixed by 0x) are supported. … … 148 148 * @ returns 0 if success / returns -1 if failure. 149 149 **************************************************************************************/ 150 int get_uint32( unsigned int * buffer ); 150 void get_uint32( unsigned int * buffer ); 151 151 152 152 153 /*************************************************************************************** 153 * Th is syscall returns a character string from the standard "stdin" stream.154 * The string iscopied in buffer pointed by the <string> argument.155 * If the number of characters exceed the buffer length, all character are canceled156 * in both the buffer & the echoed string, and a new string capture start.154 * These syscalls return a NUL terminated character string from the TXT terminal. 155 * The characters are copied in buffer pointed by the <string> argument. 156 * If the number of characters exceeds <maxlen>, all read characters are discarded, 157 * and removed from the <string> buffer, and a new string capture start. 157 158 * - Only printable characters c such as (0x20 <= c) and (c < 0x7f) are echoed 158 159 * and copied in the target buffer. … … 162 163 * used to correct both the buffer content and the echoed string. 163 164 *************************************************************************************** 164 * @ string : pointer on the string buffer.165 * @ string : pointer on the user space string buffer. 165 166 * @ maxlen : max number of bytes in string buffer, including the terminating NUL. 166 * @ returns string length (including NUL) if success / returns -1if failure.167 * @ returns string length (including NUL) if success / returns 0 if failure. 167 168 **************************************************************************************/ 168 169 int get_string( char * string, … … 327 328 unsigned int fdid ); 328 329 329 /***************************************************************************************** 330 /*************************************************************************************** 331 * This debug syscall displays on the kernel terminal the set of open file descriptors 332 * registered in the fd_array of a process identified by the <pid> argument. 333 * It can be called by any thread running in any cluster. 334 *************************************************************************************** 335 * @ pid : target process identifier. 336 setoreturn 0 if success / return -1 if undefined pid. 337 **************************************************************************************/ 338 int display_fd_array( unsigned int pid ); 339 340 /*************************************************************************************** 341 * This debug syscall displays on the kernel terminal the set of registered windows 342 * in the FBF device. It can be called by any thread running in any cluster. 343 *************************************************************************************** 344 * @ pid : target process identifier / all processes when pid == 0 345 * return 0 if success / return -1 if undefined pid. 346 **************************************************************************************/ 347 int display_fbf_windows( unsigned int pid ); 348 349 /*************************************************************************************** 330 350 * This debug syscall is used to activate / desactivate the context switches trace 331 351 * for a core identified by the <cxy> and <lid> arguments. 332 352 * It can be called by any thread running in any cluster. 333 **************************************************************************************** *353 **************************************************************************************** 334 354 * @ active : activate trace if non zero / desactivate if zero. 335 355 * @ cxy : cluster identifier. 336 356 * @ lid : core local index. 337 357 * @ returns O if success / returns -1 if illegal arguments. 338 *************************************************************************************** */358 ***************************************************************************************/ 339 359 int trace( unsigned int active, 340 360 unsigned int cxy, 341 361 unsigned int lid ); 342 362 343 /*************************************************************************************** *363 /*************************************************************************************** 344 364 * This syscall implements an user-level interactive debugger that can be 345 365 * introduced in any user application to display various kernel distributed structures. 346 ************************************************************************************** */366 **************************************************************************************/ 347 367 void idbg( void ); 348 368 349 369 350 /****************** Non standard (ALMOS-MKH specific) malloc operations ************** */351 352 //////////////////////////////////////////////////////////////////////////////////////// /370 /****************** Non standard (ALMOS-MKH specific) malloc operations **************/ 371 372 //////////////////////////////////////////////////////////////////////////////////////// 353 373 // General principles: 354 374 // - In user space the HEAP zone spread between the ELF zone and the STACK zone, … … 367 387 // is allocated on demand in each cluster. 368 388 // We should introduce the possibility to dynamically allocate 369 // several vsegs in each cluster , using several mmapwhen required.370 //////////////////////////////////////////////////////////////////////////////////////// /389 // several vsegs in each cluster (using several mmap) when required. 390 //////////////////////////////////////////////////////////////////////////////////////// 371 391 // Free blocks organisation in each cluster : 372 392 // - All free blocks have a size that is a power of 2, larger or equal … … 379 399 // - The pointers on the first free block for each size are stored in an 380 400 // array of pointers free[32] in the storage(x,y) descriptor. 381 //////////////////////////////////////////////////////////////////////////////////////// /401 //////////////////////////////////////////////////////////////////////////////////////// 382 402 // Allocation policy: 383 403 // - The block size required by the user can be any value, but the allocated … … 400 420 // If the vseg is aligned (the vseg base is a multiple of the 401 421 // vseg size), all allocated blocks are aligned on the actual_size. 402 //////////////////////////////////////////////////////////////////////////////////////// /422 //////////////////////////////////////////////////////////////////////////////////////// 403 423 // Free policy: 404 424 // - Each allocated block is registered in an alloc[] array of unsigned char. … … 598 618 599 619 /***************************************************************************************** 600 * This functionreturns in the <width>, <height> and <type> arguments620 * This syscall returns in the <width>, <height> and <type> arguments 601 621 * the implementation specific frame buffer features. 602 622 ***************************************************************************************** … … 606 626 * @ returns 0 if success / returns -1 if not found. 607 627 ****************************************************************************************/ 608 int fbf_get_config( unsignedint * width,609 unsignedint * height,610 unsignedint * type );611 612 /***************************************************************************************** 613 * This functioncreates a new window defined by the <l_zero>, <p_zero>, <nlines>,614 * and <npixels> arguments for the calling process, and register the process PID, the615 * allocated <wid>, and the window size and coordinates in the FBF device descriptor.616 * It returns in the output argument <buffer> the pointer on the buffer associated to617 * the window, mapped in user space.628 int fbf_get_config( int * width, 629 int * height, 630 int * type ); 631 632 /***************************************************************************************** 633 * This syscall creates a new window defined by the <l_zero>, <p_zero>, <nlines>, 634 * and <npixels> arguments for the calling process, and register the client process PID, 635 * the allocated <wid>, and the window size and coordinates in the list of windows rooted 636 * in the FBF device descriptor. It returns in the output argument <buffer> the pointer 637 * on the buffer associated to the window, mapped in user space. 618 638 * Warning : Both pixel [p_zero,l_zero] and pixel [p_zero+npixels-1,l_zero+nlines-1] 619 639 * must be contained in the frame buffer. … … 623 643 * @ nlines : [in] number of lines in the window. 624 644 * @ npixels : [in] number of pixels per line in the window. 625 * @ buffer : [out] pointer on 626 * @ returns <wid> if success / returns -1 if illegal size or coordinates. 627 ****************************************************************************************/ 628 int fbf_create_window( unsigned int l_zero, 629 unsigned int p_zero, 630 unsigned int nlines, 631 unsigned int npixels, 632 void ** buffer ); 633 634 /***************************************************************************************** 635 * This function deletes an existing window, identified by the <wid> argument. 645 * @ buffer : [out] pointer on buffer associated to window, mapped in user space. 646 * @ returns <kern_wid> if success / returns -1 if illegal size or coordinates. 647 ****************************************************************************************/ 648 int fbf_create_window( int l_zero, 649 int p_zero, 650 int nlines, 651 int npixels, 652 void ** buffer ); 653 654 /***************************************************************************************** 655 * This syscall activates/desactivates the window identified by the <wid> argument, 656 * according to the <active> argument. The calling process must be the window owner. 657 ***************************************************************************************** 658 * @ wid : window identifier. 659 * @ active : activate window if non zero / desactivate window if zero. 660 * @ returns 0 if success / returns -1 if illegal wid argument. 661 ****************************************************************************************/ 662 int fbf_active_window( int wid, 663 int active ); 664 665 /***************************************************************************************** 666 * This syscall deletes an existing window, identified by the <wid> argument. 636 667 * The calling process must be the window owner. 637 668 ***************************************************************************************** 638 669 * @ wid : window identifier. 639 * @ returns 0 if success / returns -1 if not found or process not owner.640 ****************************************************************************************/ 641 int fbf_delete_window( unsignedint wid );642 643 /***************************************************************************************** 644 * This functionrefreshes in FBF all lines of a window identified by the <wid> argument,670 * @ returns 0 if success / returns -1 if illegal wid argument. 671 ****************************************************************************************/ 672 int fbf_delete_window( int wid ); 673 674 /***************************************************************************************** 675 * This syscall refreshes in FBF all lines of a window identified by the <wid> argument, 645 676 * when the line index is in the interval [line_first,line_last[. 646 677 * It scans all registered windows to take into account the windows overlap. 678 * The calling process must be the window owner, and the line_fist / line_last indexes 679 * must be compatible with the window height. 647 680 ***************************************************************************************** 648 681 * @ wid : window identifier. 649 * @ line_first : first line index. 650 * @ line_last : last line index (excluded). 651 * @ returns 0 if success / returns -1 if illegal argument. 652 ****************************************************************************************/ 653 int fbf_refresh_window( unsigned int wid, 654 unsigned int line_first, 655 unsigned int line_last ); 656 657 /***************************************************************************************** 658 * This function changes the size of a window identified by the <wid> argument as defined 682 * @ line_first : first line index in window. 683 * @ line_last : last line index in window (excluded). 684 * @ returns 0 if success / returns -1 if illegal arguments. 685 ****************************************************************************************/ 686 int fbf_refresh_window( int wid, 687 int line_first, 688 int line_last ); 689 690 /***************************************************************************************** 691 * This syscall gives the highest priority to the window identified by the <wid> 692 * argument, and refresh the FBF to take into account the new windows overlap priorities. 693 * The calling process must be the window owner. 694 ***************************************************************************************** 695 * @ wid : window identifier. 696 * @ returns 0 if success / returns -1 if wid illegal argument. 697 ****************************************************************************************/ 698 int fbf_front_window( int wid ); 699 700 /***************************************************************************************** 701 * This syscall changes the size of a window identified by the <wid> argument as defined 659 702 * by the <width> and height> arguments. The calling process must be the window owner. 660 * WARNING : Both pixel [p_zero,l_zero] and pixel [p_zero+width-1,l_zero+height-1]661 * must becontained in the frame buffer.703 * Both pixel [p_zero,l_zero] and pixel [p_zero+width-1,l_zero+height-1] must be 704 * contained in the frame buffer. 662 705 ***************************************************************************************** 663 706 * @ wid : window identifier. … … 666 709 * @ returns 0 if success / returns -1 if illegal arguments. 667 710 ****************************************************************************************/ 668 int fbf_resize_window( unsignedint wid,669 unsignedint width,670 unsignedint height );671 672 /***************************************************************************************** 673 * This functionchanges the <l_zero> & <p_zero> coordinates of a window identified711 int fbf_resize_window( int wid, 712 int width, 713 int height ); 714 715 /***************************************************************************************** 716 * This syscall changes the <l_zero> & <p_zero> coordinates of a window identified 674 717 * by the <wid> argument. The calling process must be the window owner. 675 * WARNING :Both pixel [p_zero,l_zero] and pixel [p_zero+width-1,l_zero+height-1]718 * Both pixel [p_zero,l_zero] and pixel [p_zero+width-1,l_zero+height-1] 676 719 * must be contained in the frame buffer. 677 720 ***************************************************************************************** … … 681 724 * @ returns 0 if success / returns -1 if illegal arguments. 682 725 ****************************************************************************************/ 683 int fbf_move_window( unsigned int wid, 684 unsigned int l_zero, 685 unsigned int p_zero ); 726 int fbf_move_window( int wid, 727 int l_zero, 728 int p_zero ); 729 730 731 686 732 687 733 /***************************************************************************************** … … 695 741 * @ returns 0 if success / returns -1 if illegal arguments. 696 742 ****************************************************************************************/ 697 int fbf_write( void 698 unsigned intlength,699 unsigned intoffset );743 int fbf_write( void * buffer, 744 int length, 745 int offset ); 700 746 701 747 /***************************************************************************************** … … 709 755 * @ returns 0 if success / returns -1 if illegal arguments. 710 756 ****************************************************************************************/ 711 int fbf_read( void 712 unsigned intlength,713 unsigned intoffset );757 int fbf_read( void * buffer, 758 int length, 759 int offset ); 714 760 715 761
Note: See TracChangeset
for help on using the changeset viewer.