The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Интерактивная система просмотра системных руководств (man-ов)

 ТемаНаборКатегория 
 
 [Cписок руководств | Печать]

kvm_getpcpu (3)
  • >> kvm_getpcpu (3) ( FreeBSD man: Библиотечные вызовы )

  • BSD mandoc
     

    NAME

    
    
    kvm_getmaxcpu
    
     
    kvm_getpcpu
    
     - access per-CPU data
    
     
    

    LIBRARY

    Lb libkvm
    
     
    

    SYNOPSIS

       #include <sys/param.h>
       #include <sys/pcpu.h>
       #include <sys/sysctl.h>
       #include <kvm.h>
    int kvm_getmaxcpu (kvm_t *kd);
    void * kvm_getpcpu (kvm_t *kd int cpu);
     

    DESCRIPTION

    The kvm_getmaxcpu ();
    and kvm_getpcpu ();
    functions are used to access the per-CPU data of active processors in the kernel indicated by Fa kd . The kvm_getmaxcpu ();
    function returns the maximum number of CPUs supported by the kernel. The kvm_getpcpu ();
    function returns a buffer holding the per-CPU data for a single CPU. This buffer is described by the Vt struct pcpu type. The caller is responsible for releasing the buffer via a call to free(3) when it is no longer needed. If Fa cpu is not active, then NULL is returned instead.  

    CACHING

    These functions cache the nlist values for various kernel variables which are reused in successive calls. You may call either function with Fa kd set to NULL to clear this cache.  

    RETURN VALUES

    On success, the kvm_getmaxcpu ();
    function returns the maximum number of CPUs supported by the kernel. If an error occurs, it returns -1 instead.

    On success, the kvm_getpcpu ();
    function returns a pointer to an allocated buffer or NULL. If an error occurs, it returns -1 instead.

    If either function encounters an error, then an error message may be retrieved via kvm_geterr3.  

    SEE ALSO

    free(3), kvm(3)


     

    Index

    NAME
    LIBRARY
    SYNOPSIS
    DESCRIPTION
    CACHING
    RETURN VALUES
    SEE ALSO


    Поиск по тексту MAN-ов: 




    Партнёры:
    PostgresPro
    Inferno Solutions
    Hosting by Hoster.ru
    Хостинг:

    Закладки на сайте
    Проследить за страницей
    Created 1996-2024 by Maxim Chirkov
    Добавить, Поддержать, Вебмастеру