Result:
found more than 1151 distributions - search limited to the first 2001 files matching your query ( run in 0.813 )


Sys-CpuLoad

 view release on metacpan or  search on metacpan

CpuLoad.xs  view on Meta::CPAN

void
getloadavg()
    PREINIT:
        double loadavg[3];
        int    nelem;
    PPCODE:
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__) || defined(__linux__) || defined(__sun) || defined(__DragonFly__)
        nelem = getloadavg(loadavg, 3);
#else
        nelem = -1;
#endif

 view all matches for this distribution


Sys-Hostname-FQDN

 view release on metacpan or  search on metacpan

FQDN.xs  view on Meta::CPAN

void
usually_short()
    PREINIT:
	SV * out;
	char local_name[NS_MAXDNAME];
    PPCODE:
	if (gethostname(local_name,NS_MAXDNAME) != 0) {
	  ST(0) = &PL_sv_undef;
	}
	else {
	  out = sv_2mortal(newSVpv(local_name,0));

FQDN.xs  view on Meta::CPAN

	SV * out;  
	union {    
	    struct in_addr * inadr;
	    char * addr;
	} naddr;
    PPCODE:
	naddr.addr = (SvPV(netaddr, len));
	out = sv_2mortal(newSVpv(inet_ntoa(*naddr.inadr),0));
	ST(0) = out;
	XSRETURN(1);

FQDN.xs  view on Meta::CPAN

	union {
	    struct in_addr * inadr;
	    char * addr;
	} naddr;
	struct in_addr myaddr;
    PPCODE:
	dq = (unsigned char *)(SvPV(dotquad, len));
	inet_aton((char *)dq,&myaddr);
	out = sv_2mortal(newSVpv((char *)&myaddr.s_addr,4));
	ST(0) = out;
	XSRETURN(1);

 view all matches for this distribution


Sys-Hwloc

 view release on metacpan or  search on metacpan

Hwloc.xs  view on Meta::CPAN


#else
void
hwloc_get_api_version()
  PROTOTYPE:
  PPCODE:
    XSRETURN_UNDEF;

#endif

 # -------------------------------------------------------------------

Hwloc.xs  view on Meta::CPAN

hwloc_topology_check(topo)
  hwloc_topology_t topo
  PROTOTYPE: $
  ALIAS:
    Sys::Hwloc::Topology::check = 1
  PPCODE:
    PERL_UNUSED_VAR(ix);
    hwloc_topology_check(topo);


void
hwloc_topology_destroy(topo)
  hwloc_topology_t topo
  PROTOTYPE: $
  ALIAS:
    Sys::Hwloc::Topology::destroy = 1
  PPCODE:
    PERL_UNUSED_VAR(ix);
    if(topo) {
      hwloc_topology_destroy(topo);
      sv_setref_pv(ST(0), "Sys::Hwloc::Topology", (void *)NULL);
    }

Hwloc.xs  view on Meta::CPAN

  hwloc_topology_t  topo
  const char       *path
  PROTOTYPE: $$
  ALIAS:
    Sys::Hwloc::Topology::export_xml = 1
  PPCODE:
    PERL_UNUSED_VAR(ix);
    hwloc_topology_export_xml(topo,path);

#endif

Hwloc.xs  view on Meta::CPAN

    Sys::Hwloc::Topology::get_closest_objs = 1
  PREINIT:
    int rc;
    int i;
    hwloc_obj_t *objs = NULL;
  PPCODE:
    PERL_UNUSED_VAR(ix);
    if((objs = (hwloc_obj_t *)malloc(1024 * sizeof(hwloc_obj_t *))) == NULL)
      croak("Failed to allocate memory");
    rc = hwloc_get_closest_objs(topo,obj,objs,1024);
    if(rc < 0)

Hwloc.xs  view on Meta::CPAN

children(o)
  hwloc_obj_t o
  PROTOTYPE: $
  PREINIT:
    int i;
  PPCODE:
    EXTEND(SP, o->arity);
    for(i = 0; i < o->arity; i++)
      PUSHs(sv_2mortal(hwlocObj2SV(o->children[i])));
    XSRETURN(o->arity);

Hwloc.xs  view on Meta::CPAN

void
copy(set,dst)
  hwloc_cpuset_t set
  hwloc_cpuset_t dst
  PROTOTYPE: $$
  PPCODE:
    hwloc_cpuset_copy(dst,set);


#if HWLOC_XSAPI_VERSION
void

Hwloc.xs  view on Meta::CPAN

    Sys::Hwloc::Cpuset::andnot = 1
    Sys::Hwloc::Cpuset::or     = 2
    Sys::Hwloc::Cpuset::xor    = 3
  PREINIT:
    hwloc_cpuset_t res = NULL;
  PPCODE:
    if((res = hwloc_cpuset_alloc()) == NULL)
      croak("Failed to create temporary cpuset in Sys::Hwloc::Cpuset->and alias %d", (int)ix);
    if(ix == 0)
      hwloc_cpuset_and(res,set,seta);
    else if(ix == 1)

Hwloc.xs  view on Meta::CPAN

not(set)
  hwloc_cpuset_t set
  PROTOTYPE: $
  PREINIT:
    hwloc_cpuset_t res = NULL;
  PPCODE:
    if((res = hwloc_cpuset_alloc()) == NULL)
      croak("Failed to create temporary cpuset in Sys::Hwloc::Cpuset->not");
    hwloc_cpuset_not(res,set);
    hwloc_cpuset_free(set);
    sv_setref_pv(ST(0), "Sys::Hwloc::Cpuset", (void *)res);

Hwloc.xs  view on Meta::CPAN

  hwloc_cpuset_t seta
  PROTOTYPE: $$
  ALIAS:
    Sys::Hwloc::Cpuset::or     = 2
    Sys::Hwloc::Cpuset::xor    = 3
  PPCODE:
    if(ix == 0)
      hwloc_cpuset_andset(set,seta);
    else if(ix == 2)
      hwloc_cpuset_orset(set,seta);
    else if(ix == 3)

Hwloc.xs  view on Meta::CPAN

void
copy(map,dst)
  hwloc_bitmap_t map
  hwloc_bitmap_t dst
  PROTOTYPE: $$
  PPCODE:
    hwloc_bitmap_copy(dst,map);


void
and(map,mapa)

Hwloc.xs  view on Meta::CPAN

    Sys::Hwloc::Bitmap::andnot = 1
    Sys::Hwloc::Bitmap::or     = 2
    Sys::Hwloc::Bitmap::xor    = 3
  PREINIT:
    hwloc_bitmap_t res = NULL;
  PPCODE:
    if((res = hwloc_bitmap_alloc()) == NULL)
      croak("Failed to create temporary bitmap in Sys::Hwloc::Bitmap->and alias %d", (int)ix);
    if(ix == 0)
      hwloc_bitmap_and(res,map,mapa);
    else if(ix == 1)

Hwloc.xs  view on Meta::CPAN

not(map)
  hwloc_bitmap_t map
  PROTOTYPE: $
  PREINIT:
    hwloc_bitmap_t res = NULL;
  PPCODE:
    if((res = hwloc_bitmap_alloc()) == NULL)
      croak("Failed to create temporary bitmap in Sys::Hwloc::Bitmap->not");
    hwloc_bitmap_not(res,map);
    hwloc_bitmap_free(map);
    sv_setref_pv(ST(0), "Sys::Hwloc::Bitmap", (void *)res);

 view all matches for this distribution


Sys-Ibam

 view release on metacpan or  search on metacpan

Ibam.xs  view on Meta::CPAN

PROTOTYPES: ENABLE

void
ibam::new(do_second_correction=TRUE)
		int do_second_correction
	PPCODE:
		ST(0) = new_ibam_object(new ibam(), CLASS);
		HV* hv = (HV*)SvRV(ST(0));
		hv_store(hv, "do_second_correction", 20, newSViv(do_second_correction), 0);
		sv_2mortal(ST(0));
		XSRETURN(1);

 view all matches for this distribution


Sys-Info-Driver-Windows

 view release on metacpan or  search on metacpan

Windows.xs  view on Meta::CPAN

    TCHAR           wProcessorModel         [10];
    TCHAR           wProcessorStepping      [10];
    TCHAR           wProcessorArchitecture2 [64];
    unsigned int    wProcessBitness;
    unsigned int    wProcessorBitness;
PPCODE:
    /*
        See:
        - http://msdn.microsoft.com/en-us/library/ms724429(VS.85).aspx
        - http://blogs.msdn.com/junfeng/archive/2005/07/01/434574.aspx
    */

Windows.xs  view on Meta::CPAN

    unsigned ecx = 0;
    unsigned CpuFeatures = 0;
    unsigned Flags;
    unsigned KFBits;
    unsigned FeatureFlags;
PPCODE:
    /*
        Resources:
        - http://msdn.microsoft.com/en-us/library/hskdteyh(VS.80).aspx
        - http://stackoverflow.com/questions/794632/programmatically-get-the-cache-line-size
        - http://en.wikipedia.org/wiki/CPUID

 view all matches for this distribution


Sys-Lastlog

 view release on metacpan or  search on metacpan

Lastlog.xs  view on Meta::CPAN

PROTOTYPES: ENABLE

void
getllent(self)
SV *self
  PPCODE:
    struct lastlog *llent;
    SV *ll_ref;

    static IV count = 0;

Lastlog.xs  view on Meta::CPAN


void
getlluid(self, uid)
SV *self
IV uid
  PPCODE:
    struct lastlog *llent;
    SV *ll_ref;

    if(!SvROK(self)) 
        croak("Must be called as an object method");

Lastlog.xs  view on Meta::CPAN


void
getllnam(self,logname)
SV *self
char *logname
  PPCODE:
    struct passwd *pwd;
    struct lastlog *llent;
    SV *ll_ref;

    if(!SvROK(self)) 

Lastlog.xs  view on Meta::CPAN

      XSRETURN_EMPTY;
    }

void lastlog_path(self)
SV *self
   PPCODE:
    if(!SvROK(self)) 
        croak("Must be called as an object method");
      EXTEND(SP,1);
      PUSHs(sv_2mortal(newSVpv(lastlog_path(),0)));
       
void
setllent(self)
SV *self
   PPCODE:

    if(!SvROK(self)) 
        croak("Must be called as an object method");

    setllent(); 

 view all matches for this distribution


Sys-Load

 view release on metacpan or  search on metacpan

Load.xs  view on Meta::CPAN

getload()
PROTOTYPE:
PREINIT:
  double load[3];
  int i;
PPCODE:
  i = getloadavg(load, 3);
  if(i == -1)
    XSRETURN_EMPTY;
  else {
    XPUSHs(sv_2mortal(newSVnv(load[0])));

 view all matches for this distribution


Sys-LoadAvg

 view release on metacpan or  search on metacpan

LoadAvg.xs  view on Meta::CPAN

  PROTOTYPE:
  PREINIT:
    double loadavg[2];
    int retval; 
    int i;
  PPCODE:
    retval = getloadavg(loadavg, 3);
    EXTEND(SP, 3);
    for (i=0; i<3; i++) {
        if (i < retval) {
            PUSHs(sv_2mortal(newSVnv(loadavg[i])));

 view all matches for this distribution


Sys-MemInfo

 view release on metacpan or  search on metacpan

arch/aix.xs  view on Meta::CPAN

#include <libperfstat.h>

void
availkeys()
	PREINIT:
	PPCODE:
                XPUSHs(sv_2mortal(newSVpv(_totalmem, strlen(_totalmem))));
                XPUSHs(sv_2mortal(newSVpv(_freemem, strlen(_freemem))));
                XPUSHs(sv_2mortal(newSVpv(_totalswap, strlen(_totalswap))));
                XPUSHs(sv_2mortal(newSVpv(_freeswap, strlen(_freeswap))));

 view all matches for this distribution


Sys-Proctitle

 view release on metacpan or  search on metacpan

Proctitle.xs  view on Meta::CPAN

    RETVAL

void
setproctitle(...)
  PROTOTYPE: @
  PPCODE:
    if( items > 0 ) {
      char *title, *buf, *cur;
      STRLEN len;
      int i, max;

 view all matches for this distribution


Sys-Syslog

 view release on metacpan or  search on metacpan

fallback/const-xs.inc  view on Meta::CPAN

	/* NV		nv;	Uncomment this if you need to return NVs */
	const char	*pv;
    INPUT:
	SV *		sv;
        const char *	s = SvPV(sv, len);
    PPCODE:
        /* Change this to constant(aTHX_ s, len, &iv, &nv);
           if you need to return both NVs and IVs */
	type = constant(aTHX_ s, len, &iv, &pv);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */

 view all matches for this distribution


( run in 0.813 second using v1.01-cache-2.11-cpan-5511b514fd6 )