type
stringclasses
5 values
content
stringlengths
9
163k
functions
int AccessWmiBuffer(PUCHAR Buffer, int readbuffer, ULONG * RequiredSize, size_t BufferSize, ...) { va_list vl; ULONG_PTR offset; ULONG_PTR offby; PUCHAR position = Buffer; PUCHAR endbuffer = Buffer + BufferSize; int overflow=0; va_start(vl, BufferSize); for(;;) { ...
functions
break switch (type) { case WMI_STRING: { UCHAR **countstr; USHORT strsize; offset = (2-((ULONG_PTR)position%2))%2; position+=offset; if (position + size...
functions
NTSTATUS WriteCountedUnicodeString( const UNICODE_STRING *ustr, UCHAR *location ) { *((USHORT*)location) = ustr->Length; RtlCopyMemory(location+sizeof(USHORT), ustr->Buffer, ustr->Length); return STATUS_SUCCESS; }
functions
NTSTATUS WriteCountedUTF8String(const char * string, UCHAR *location) { UNICODE_STRING unicode; int i=0; USHORT b; USHORT bytesize=0; ULONG utf32; NTSTATUS status = STATUS_SUCCESS; WCHAR *buffer; bytesize = CountBytesUtf16FromUtf8(string); buffer = ExAllocatePoolWithTag(NonPagedPool...
functions
NTSTATUS WriteCountedString( const char * string, UCHAR * location ) { ANSI_STRING ansi; UNICODE_STRING unicode; NTSTATUS status; RtlInitAnsiString(&ansi, string); status = RtlAnsiStringToUnicodeString(&unicode, &ansi, TRUE); if (NT_SUCCESS(status)) { status = WriteCount...
functions
void AllocUnicodeStringBuffer(UNICODE_STRING *string, USHORT buffersize) { string->Buffer = ExAllocatePoolWithTag(NonPagedPool, buffersize, 'XIUC'); string->Length = 0; if (string->Buffer == NULL) { string->MaximumLength=0; return; }
functions
void FreeUnicodeStringBuffer(UNICODE_STRING *string) { if (string->Buffer) ExFreePoolWithTag(string->Buffer, 'XIUC'); string->Length=0; string->MaximumLength=0; string->Buffer = NULL; }
functions
NTSTATUS CloneUnicodeString(UNICODE_STRING *dest, UNICODE_STRING *src) { NTSTATUS status; AllocUnicodeStringBuffer(dest, src->Length); if (dest->Buffer == NULL) return STATUS_INSUFFICIENT_RESOURCES; status = RtlUnicodeStringCopy(dest, src); if (!NT_SUCCESS(status)) { FreeUnicodeStrin...
functions
NTSTATUS StringToUnicode(UNICODE_STRING *ustr, const char * str) { ANSI_STRING ansi; RtlInitAnsiString(&ansi, str); return RtlAnsiStringToUnicodeString(ustr, &ansi, TRUE); }
functions
size_t GetCountedSize(const char * string) { ANSI_STRING ansi; RtlInitAnsiString(&ansi, string); return sizeof(USHORT)+sizeof(WCHAR)*ansi.Length; }
functions
size_t GetCountedUtf8Size(const char *utf8) { return sizeof(USHORT) + CountBytesUtf16FromUtf8(utf8); }
functions
size_t GetCountedUnicodeStringSize(UNICODE_STRING *string) { return sizeof(USHORT)+string->Length; }
functions
size_t GetInstanceNameSize(XENIFACE_FDO* FdoData, const char *string) { ANSI_STRING ansi; RtlInitAnsiString(&ansi, string); return sizeof(USHORT) + FdoData->SuggestedInstanceName.Length + sizeof(WCHAR) + sizeof(WCHAR)*ansi.Length; }
functions
NTSTATUS GetInstanceName(UNICODE_STRING *dest, XENIFACE_FDO* FdoData, const char *string) { ANSI_STRING ansi; UNICODE_STRING unicode; NTSTATUS status; size_t destsz; RtlInitAnsiString(&ansi, string); status = RtlAnsiStringToUnicodeString(&unicode, &ansi, TRUE); if (!NT_SUCCESS(status)) { ...
functions
NTSTATUS WriteInstanceName(XENIFACE_FDO* FdoData, const char *string, UCHAR *location) { UNICODE_STRING destination; NTSTATUS status; status = GetInstanceName(&destination, FdoData, string); if (!NT_SUCCESS(status)) return status; status = WriteCountedUnicodeString(&destination, location); ...
functions
void UnicodeShallowCopy(UNICODE_STRING *dest, UNICODE_STRING *src) { dest->Buffer = src->Buffer; dest->Length = src->Length; dest->MaximumLength = src->MaximumLength; }
functions
int CompareUnicodeStrings(PCUNICODE_STRING string1, PCUNICODE_STRING string2) { if (string1->Length == string2->Length) { return RtlCompareMemory(string1->Buffer,string2->Buffer, string1->Length) != string1->Length; }
functions
void FireSuspendEvent(PXENIFACE_FDO fdoData) { XenIfaceDebugPrint(ERROR,"Ready to unsuspend Event\n"); KeSetEvent(&fdoData->registryWriteEvent, IO_NO_INCREMENT, FALSE); if (fdoData->WmiReady) { XenIfaceDebugPrint(TRACE,"Fire Suspend Event\n"); WmiFireEvent(fdoData->Dx->DeviceObject, ...
functions
void FireWatch(XenStoreWatch* watch) { UCHAR * eventdata; ULONG RequiredSize; UCHAR *sesbuf; AccessWmiBuffer(0, FALSE, &RequiredSize, 0, WMI_STRING, GetCountedUnicodeStringSize(&watch->path), &sesbuf, WMI_DONE); eventdata = ExAllocatePoolWithTag(NonPaged...
functions
NTSTATUS StartWatch(XENIFACE_FDO *fdoData, XenStoreWatch *watch) { char *tmppath; ANSI_STRING ansipath; NTSTATUS status; status = RtlUnicodeStringToAnsiString(&ansipath, &watch->path, TRUE); if (!NT_SUCCESS(status)) { return STATUS_INSUFFICIENT_RESOURCES; }
functions
VOID WatchCallbackThread(__in PVOID StartContext) { NTSTATUS status; int i=0; XenStoreSession * session = (XenStoreSession*) StartContext; for(;;) { ExAcquireFastMutex(&session->WatchMapLock); if (session->mapchanged) { // Construct a new mapping XenStoreWatch *w...
functions
else if ( status == STATUS_WAIT_0 + i) { ExAcquireFastMutex(&session->WatchMapLock); KeClearEvent(&session->SessionChangedEvent); if (session->closing==TRUE) { XenIfaceDebugPrint(TRACE,"Trying to end session thread\n"); if (session->watchcount != 0) {...
functions
NTSTATUS SessionAddWatchLocked(XenStoreSession *session, XENIFACE_FDO* fdoData, UNICODE_STRING *path, XenStoreWatch **watch) { NTSTATUS status; XenStoreWatch *pwatch; if (session->watchcount >= MAX_WATCH_COUNT) { return...
functions
void SessionRemoveWatchLocked(XenStoreSession *session, XenStoreWatch *watch) { XenStoreWatch *pwatch; XenIfaceDebugPrint(TRACE, "Remove watch locked\n"); XenIfaceDebugPrint(TRACE, "watch %p\n", watch); XenIfaceDebugPrint(TRACE, "handle %p\n", watch->watchhandle); if (watch->watchhandle) { ...
functions
void SessionRemoveWatchesLocked(XenStoreSession *session) { XenStoreWatch *watch; XenIfaceDebugPrint(TRACE, "wait remove mutex\n"); ExAcquireFastMutex(&session->WatchMapLock); for (watch = (XenStoreWatch *)session->watches.Flink; watch!=(XenStoreWatch *)&session->watches; watch=(Xen...
functions
PSTR Xmasprintf(const char *fmt, ...) { va_list argv; PSTR out; size_t basesize = 128; size_t unused; NTSTATUS status; va_start(argv, fmt); do{ basesize = basesize * 2; out = ExAllocatePoolWithTag(NonPagedPool, basesize, 'XenP'); if (out == NULL) return N...
functions
NTSTATUS CreateNewSession(XENIFACE_FDO *fdoData, UNICODE_STRING *stringid, ULONG *sessionid) { XenStoreSession *session; PSTR iname; NTSTATUS status; ANSI_STRING ansi; HANDLE hthread; int count = 0; OBJECT_ATTRIBUTES oa; if (fdoData->Sessions ==...
functions
void RemoveSessionLocked(XENIFACE_FDO *fdoData, XenStoreSession *session) { XenIfaceDebugPrint(TRACE,"RemoveSessionLocked\n"); RemoveEntryList((LIST_ENTRY*)session); fdoData->Sessions--; SessionRemoveWatchesLocked(session); if (session->transaction != NULL) { XENB...
functions
void RemoveSession(XENIFACE_FDO *fdoData, XenStoreSession *session) { XenIfaceDebugPrint(TRACE,"RemoveSession\n"); LockSessions(fdoData); RemoveSessionLocked(fdoData, session); UnlockSessions(fdoData); }
functions
void SessionsRemoveAll(XENIFACE_FDO *fdoData) { XenIfaceDebugPrint(TRACE,"lock"); LockSessions(fdoData); XenIfaceDebugPrint(TRACE,"in lock"); while (fdoData->SessionHead.Flink != &fdoData->SessionHead) { RemoveSessionLocked(fdoData, (XenStoreSession *)fdoData->SessionHead.Flink); }
functions
void SessionUnwatchWatchesLocked(XenStoreSession *session) { int i; XenStoreWatch *watch; ExAcquireFastMutex(&session->WatchMapLock); watch = (XenStoreWatch *)session->watches.Flink; for (i=0; watch != (XenStoreWatch *)&session->watches; i++) { XenIfaceDebugPrint(TRACE,"Suspend unwatch %p\n"...
functions
void SuspendSessionLocked(XENIFACE_FDO *fdoData, XenStoreSession *session) { SessionUnwatchWatchesLocked(session); if (session->transaction != NULL) { XenIfaceDebugPrint(TRACE, "End transaction %p\n",session->transaction); XENBUS_STORE(TransactionEnd, &fdoData-...
functions
void SessionsSuspendAll(XENIFACE_FDO *fdoData) { XenStoreSession *session; LockSessions(fdoData); XenIfaceDebugPrint(TRACE,"Suspend all sessions\n"); session = (XenStoreSession *)fdoData->SessionHead.Flink; while (session != (XenStoreSession *)&fdoData->SessionHead) { SuspendSessionLocked(fd...
functions
void SessionRenewWatchesLocked(XenStoreSession *session) { int i; XenStoreWatch *watch; ExAcquireFastMutex(&session->WatchMapLock); watch = (XenStoreWatch *)session->watches.Flink; for (i=0; watch != (XenStoreWatch *)&session->watches; i++) { if (!watch->finished) { watch->suspen...
functions
void ResumeSessionLocked(XENIFACE_FDO *fdoData, XenStoreSession *session) { SessionRenewWatchesLocked(session); }
functions
void SessionsResumeAll(XENIFACE_FDO *fdoData) { XenStoreSession *session; LockSessions(fdoData); XenIfaceDebugPrint(TRACE,"Resume all sessions\n"); session = (XenStoreSession *)fdoData->SessionHead.Flink; while (session != (XenStoreSession *)&fdoData->SessionHead) { ResumeSessionLocked(fdoD...
functions
NTSTATUS WmiInit( PXENIFACE_FDO FdoData ) { NTSTATUS status = STATUS_SUCCESS; XenIfaceDebugPrint(TRACE,"%s\n",__FUNCTION__); XenIfaceDebugPrint(INFO,"DRV: XenIface WMI Initialisation\n"); IoWMISuggestInstanceName(FdoData->PhysicalDeviceObject, NULL, FALSE, ...
functions
NTSTATUS WmiFinalise( PXENIFACE_FDO FdoData ) { NTSTATUS status = STATUS_SUCCESS; if (FdoData->WmiReady) { XenIfaceDebugPrint(INFO,"DRV: XenIface WMI Finalisation\n"); XenIfaceDebugPrint(TRACE,"%s\n",__FUNCTION__); SessionsRemoveAll(FdoData); status =IoWMIRegist...
functions
NTSTATUS WmiChangeSingleInstance( PXENIFACE_FDO Fdo, PIO_STACK_LOCATION stack ) { UNREFERENCED_PARAMETER(Fdo); UNREFERENCED_PARAMETER(stack); XenIfaceDebugPrint(TRACE,"%s\n",__FUNCTION__); return STATUS_NOT_SUPPORTED; }
functions
NTSTATUS WmiChangeSingleItem( IN PXENIFACE_FDO Fdo, IN PIO_STACK_LOCATION stack ) { UNREFERENCED_PARAMETER(Fdo); UNREFERENCED_PARAMETER(stack); XenIfaceDebugPrint(TRACE,"%s\n",__FUNCTION__); return STATUS_NOT_SUPPORTED; }
functions
NTSTATUS WmiDisableCollection( IN PXENIFACE_FDO Fdo, IN PIO_STACK_LOCATION stack ) { UNREFERENCED_PARAMETER(Fdo); UNREFERENCED_PARAMETER(stack); XenIfaceDebugPrint(TRACE,"%s\n",__FUNCTION__); return STATUS_NOT_SUPPORTED; }
functions
NTSTATUS WmiDisableEvents( IN PXENIFACE_FDO Fdo, IN PIO_STACK_LOCATION stack ) { UNREFERENCED_PARAMETER(Fdo); UNREFERENCED_PARAMETER(stack); XenIfaceDebugPrint(TRACE,"%s\n",__FUNCTION__); return STATUS_NOT_SUPPORTED; }
functions
NTSTATUS WmiEnableCollection( IN PXENIFACE_FDO Fdo, IN PIO_STACK_LOCATION stack ) { UNREFERENCED_PARAMETER(Fdo); UNREFERENCED_PARAMETER(stack); XenIfaceDebugPrint(TRACE,"%s\n",__FUNCTION__); return STATUS_NOT_SUPPORTED; }
functions
NTSTATUS WmiEnableEvents( IN PXENIFACE_FDO Fdo, IN PIO_STACK_LOCATION stack ) { UNREFERENCED_PARAMETER(Fdo); UNREFERENCED_PARAMETER(stack); XenIfaceDebugPrint(TRACE,"%s\n",__FUNCTION__); return STATUS_NOT_SUPPORTED; }
functions
NTSTATUS NodeTooSmall(UCHAR *Buffer, ULONG BufferSize, ULONG Needed, ULONG_PTR *byteswritten) { WNODE_TOO_SMALL *node; ULONG RequiredSize; if (!AccessWmiBuffer(Buffer, FALSE, &RequiredSize, BufferSize, WMI_BUFFER, sizeof...
functions
NTSTATUS SessionExecuteRemoveValue(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, ...
functions
NTSTATUS SessionExecuteRemoveWatch(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, ...
functions
NTSTATUS SessionExecuteSetWatch(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, ...
functions
NTSTATUS SessionExecuteEndSession(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, ...
functions
NTSTATUS SessionExecuteSetValue(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, ...
functions
NTSTATUS SessionExecuteGetFirstChild(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, ...
functions
NTSTATUS SessionExecuteGetNextSibling(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, ...
functions
NTSTATUS SessionExecuteGetChildren(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, ...
functions
NTSTATUS SessionExecuteLog(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, OUT ULONG_PTR *byteswrit...
functions
NTSTATUS SessionExecuteStartTransaction(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, OUT ULONG_P...
functions
NTSTATUS SessionExecuteCommitTransaction(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, OUT ULONG_...
functions
NTSTATUS SessionExecuteAbortTransaction(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, OUT ULONG_P...
functions
NTSTATUS SessionExecuteGetValue(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, UNICODE_STRING *instance, OUT ULONG_PTR *byte...
functions
NTSTATUS BaseExecuteAddSession(UCHAR *InBuffer, ULONG InBufferSize, UCHAR *OutBuffer, ULONG OutBufferSize, XENIFACE_FDO* fdoData, OUT ULONG_PTR *byteswritten) { ULONG RequiredSize; UNICODE_STR...
functions
NTSTATUS SessionExecuteMethod(UCHAR *Buffer, ULONG BufferSize, XENIFACE_FDO* fdoData, OUT ULONG_PTR *byteswritten) { ULONG RequiredSize; WNODE_METHOD_ITEM *Method; UCHAR *InBuffer; NTSTATUS status; UNICODE_STRING instance; UCHAR *InstS...
functions
NTSTATUS BaseExecuteMethod(UCHAR *Buffer, ULONG BufferSize, XENIFACE_FDO* fdoData, OUT ULONG_PTR *byteswritten) { ULONG RequiredSize; WNODE_METHOD_ITEM *Method; UCHAR *InBuffer; NTSTATUS status; if (!AccessWmiBuffer(Buffer, TRUE, &Required...
functions
NTSTATUS WmiExecuteMethod( IN PXENIFACE_FDO fdoData, IN PIO_STACK_LOCATION stack, OUT ULONG_PTR *byteswritten ) { if (IsEqualGUID(stack->Parameters.WMI.DataPath, &OBJECT_GUID(XenStoreBase))) { return BaseExecuteMethod(stack->Parameters.WMI.Buffer, ...
functions
NTSTATUS GenerateSessionBlock(UCHAR *Buffer, ULONG BufferSize, PXENIFACE_FDO fdoData, ULONG_PTR *byteswritten) { WNODE_ALL_DATA *node; ULONG RequiredSize; size_t nodesizerequired; size_t namesizerequired; int entries; XenSto...
functions
NTSTATUS GenerateBaseBlock( XENIFACE_FDO *fdoData, UCHAR *Buffer, ULONG BufferSize, ULONG_PTR *byteswritten) { WNODE_ALL_DATA *node; ULONG RequiredSize; ULONGLONG *time; if (!AccessWmiBuffer(Buffer, FALSE, &RequiredSize, BufferSize, ...
functions
NTSTATUS GenerateBaseInstance( XENIFACE_FDO *fdoData, UCHAR *Buffer, ULONG BufferSize, ULONG_PTR *byteswritten) { WNODE_SINGLE_INSTANCE *node; ULONG RequiredSize; ULONGLONG *time; UCHAR * dbo; if (!AccessWmiBuffer(Buffer...
functions
NTSTATUS GenerateSessionInstance(UCHAR *Buffer, ULONG BufferSize, XENIFACE_FDO *fdoData, ULONG_PTR *byteswritten) { WNODE_SINGLE_INSTANCE *node; ULONG RequiredSize; UCHAR *dbo; UCHAR *InstStr; UNICODE_STRING instance; ULONG* id; Xen...
functions
NTSTATUS WmiQueryAllData( IN PXENIFACE_FDO fdoData, IN PIO_STACK_LOCATION stack, OUT ULONG_PTR *byteswritten ) { if (IsEqualGUID(stack->Parameters.WMI.DataPath, &OBJECT_GUID(XenStoreBase))) { return GenerateBaseBlock( fdoData, stac...
functions
NTSTATUS WmiQuerySingleInstance( IN PXENIFACE_FDO fdoData, IN PIO_STACK_LOCATION stack, OUT ULONG_PTR *byteswritten ) { if (IsEqualGUID(stack->Parameters.WMI.DataPath, &OBJECT_GUID(XenStoreBase))) { return GenerateBaseInstance(fdoData, ...
functions
NTSTATUS WmiRegInfo( IN PXENIFACE_FDO fdoData, IN PIO_STACK_LOCATION stack, OUT ULONG_PTR *byteswritten ) { WMIREGINFO *reginfo; WMIREGGUID *guiddata; UCHAR *mofnameptr; UCHAR *regpath; ULONG RequiredSize; int entries = 4; const static UNICODE_STRING mofname = RTL_CONSTANT_STR...
functions
NTSTATUS WmiRegInfoEx( IN PXENIFACE_FDO fdoData, IN PIO_STACK_LOCATION stack, OUT ULONG_PTR *byteswritten ) { XenIfaceDebugPrint(TRACE,"%s\n",__FUNCTION__); return WmiRegInfo(fdoData, stack, byteswritten); }
functions
NTSTATUS WmiProcessMinorFunction( IN PXENIFACE_FDO fdoData, IN PIRP Irp ) { PIO_STACK_LOCATION stack; UCHAR MinorFunction; stack = IoGetCurrentIrpStackLocation(Irp); if (stack->Parameters.WMI.ProviderId != (ULONG_PTR)fdoData->Dx->DeviceObject) { XenIfaceDebugPrint(TRACE,"ProviderID %p %p", s...
functions
NTSTATUS XenIfaceSystemControl( __in PXENIFACE_FDO fdoData, __inout PIRP Irp ) { NTSTATUS status; status = WmiProcessMinorFunction(fdoData, Irp); if (status != STATUS_NOT_SUPPORTED) { Irp->IoStatus.Status = status; IoCompleteRequest(Irp, IO_NO_INCREMENT); }
includes
#include <string.h>
functions
token_id cap_union_constraint(token_id a, token_id b) { // Decide a capability for a type parameter that is constrained by a union. if(a == b) return a; // If we're in a set together, return the set. Otherwise, use #any. switch(a) { case TK_ISO: switch(b) { case TK_VAL: ca...
functions
token_id cap_isect_constraint(token_id a, token_id b) { // Decide a capability for a type parameter that is constrained by an isect. if(a == b) return a; // If one side is #any, always use the other side. if(a == TK_CAP_ANY) return b; if(b == TK_CAP_ANY) return a; // If we're in a set, extrac...
functions
token_id cap_from_constraint(ast_t* type) { if(type == NULL) return TK_CAP_ANY; switch(ast_id(type)) { case TK_UNIONTYPE: { ast_t* child = ast_child(type); token_id cap = cap_from_constraint(child); child = ast_sibling(child); while(child != NULL) { cap = cap_un...
functions
bool apply_cap_to_single(ast_t* type, token_id tcap, token_id teph) { ast_t* cap = cap_fetch(type); ast_t* eph = ast_sibling(cap); // Return false if the tcap is not a possible reification of the cap. switch(ast_id(cap)) { case TK_CAP_SEND: switch(tcap) { case TK_ISO: case TK_...
functions
bool apply_cap(ast_t* type, token_id tcap, token_id teph) { switch(ast_id(type)) { case TK_UNIONTYPE: case TK_ISECTTYPE: { ast_t* child = ast_child(type); while(child != NULL) { ast_t* next = ast_sibling(child); if(!apply_cap(child, tcap, teph)) ast_remove(c...
functions
void typeparam_set_cap(ast_t* typeparamref) { pony_assert(ast_id(typeparamref) == TK_TYPEPARAMREF); AST_GET_CHILDREN(typeparamref, id, cap, eph); ast_t* constraint = typeparam_constraint(typeparamref); token_id tcap = cap_from_constraint(constraint); ast_setid(cap, tcap); }
functions
void typeparamref_current(ast_t* typeparamref, ast_t* scope) { pony_assert(ast_id(typeparamref) == TK_TYPEPARAMREF); ast_t* def = (ast_t*)ast_data(typeparamref); ast_t* id = ast_child(typeparamref); ast_t* current_def = ast_get(scope, ast_name(id), NULL); if(def != current_def) { ast_setdata(typeparam...
functions
void typeparam_current_inner(ast_t* type, ast_t* scope) { switch(ast_id(type)) { case TK_TYPEPARAMREF: return typeparamref_current(type, scope); case TK_NOMINAL: { ast_t* typeargs = ast_childidx(type, 2); ast_t* typearg = ast_child(typeargs); while(typearg != NULL) { ...
includes
#include <sys/types.h>
includes
#include <sys/queue.h>
includes
#include <sys/time.h>
includes
#include <bitstring.h>
includes
#include <limits.h>
includes
#include <stdio.h>
includes
#include <stdlib.h>
includes
#include <string.h>
includes
#include <termios.h>
includes
#include <unistd.h>
includes
#include <linux/irq.h>
includes
#include <linux/kthread.h>
includes
#include <linux/module.h>
includes
#include <linux/random.h>
includes
#include <linux/interrupt.h>
includes
#include <linux/slab.h>
includes
#include <linux/sched.h>
includes
#include <linux/task_work.h>
defines
#define pr_fmt(fmt) "genirq: " fmt