~ubuntu-branches/ubuntu/jaunty/ndiswrapper/jaunty

« back to all changes in this revision

Viewing changes to driver/winnt_types.h

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2007-05-29 11:30:42 UTC
  • mfrom: (1.2.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070529113042-zicvy2bsge5bkcne
Tags: 1.43-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control:
    + Update description to point out that the kernel source package is
      not required with the standard Ubuntu kernel.
    + Change the Maintainer address.
* debian/control:
  - Drop ndiswrapper-source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#define FALSE                           0
21
21
 
22
22
#define PASSIVE_LEVEL                   0
 
23
#define APC_LEVEL                       1
23
24
#define DISPATCH_LEVEL                  2
24
 
#define DEVICE_LEVEL                    (DISPATCH_LEVEL + 1)
 
25
#define DEVICE_LEVEL_BASE               4
 
26
 
 
27
/* soft interrupts / bottom-half's are disabled at SOFT_IRQL */
 
28
#define SOFT_IRQL                       (DEVICE_LEVEL_BASE + 1)
 
29
#define DIRQL                           (DEVICE_LEVEL_BASE + 2)
25
30
 
26
31
#define STATUS_WAIT_0                   0
27
32
#define STATUS_SUCCESS                  0
94
99
#define THREAD_WAIT_OBJECTS             3
95
100
#define MAX_WAIT_OBJECTS                64
96
101
 
97
 
#define LOW_PRIORITY                    1
 
102
#define LOW_PRIORITY                    0
98
103
#define LOW_REALTIME_PRIORITY           16
99
 
#define HIGH_PRIORITY                   32
 
104
#define HIGH_PRIORITY                   31
100
105
#define MAXIMUM_PRIORITY                32
101
106
 
102
107
#define PROCESSOR_FEATURE_MAX           64
228
233
        struct nt_list *prev;
229
234
};
230
235
 
231
 
typedef ULONG_PTR NT_SPIN_LOCK;
 
236
typedef volatile ULONG_PTR NT_SPIN_LOCK;
 
237
 
 
238
enum kdpc_importance {LowImportance, MediumImportance, HighImportance};
232
239
 
233
240
struct kdpc;
234
241
typedef void (*DPC)(struct kdpc *kdpc, void *ctx, void *arg1,
242
249
        void *ctx;
243
250
        void *arg1;
244
251
        void *arg2;
245
 
        NT_SPIN_LOCK *lock;
 
252
        union {
 
253
                NT_SPIN_LOCK *lock;
 
254
                /* 'lock' is not used; 'queued' represents whether
 
255
                 * kdpc is queued or not */
 
256
                int queued;
 
257
        };
246
258
};
247
259
 
248
260
enum pool_type {
360
372
        struct nt_list list;
361
373
        struct task_struct *thread;
362
374
        void *object;
363
 
        void *thread_waitq;
 
375
        int *wait_done;
364
376
        USHORT wait_key;
365
377
        USHORT wait_type;
366
378
};
417
429
                ULONGLONG due_time;
418
430
                struct wrap_timer *wrap_timer;
419
431
        };
420
 
        struct nt_list list;
 
432
        struct nt_list nt_timer_list;
421
433
        struct kdpc *kdpc;
422
434
        union {
423
435
                LONG period;
444
456
         * structure is opaque to drivers, we just define what we
445
457
         * need */
446
458
        int pid;
 
459
        NTSTATUS status;
447
460
        struct task_struct *task;
448
461
        struct nt_list irps;
449
462
        NT_SPIN_LOCK lock;
450
463
};
451
464
 
452
 
#define set_dh_type(dh, type)           ((dh)->type = (type))
453
 
#define is_mutex_dh(dh)                 ((dh)->type == MutexObject)
454
 
#define is_semaphore_dh(dh)             ((dh)->type == SemaphoreObject)
455
 
#define is_nt_thread_dh(dh)             ((dh)->type == ThreadObject)
 
465
#define set_object_type(dh, type)       ((dh)->type = (type))
 
466
#define is_notify_object(dh)            ((dh)->type == NotificationObject)
 
467
#define is_synch_object(dh)             ((dh)->type == SynchronizationObject)
 
468
#define is_mutex_object(dh)             ((dh)->type == MutexObject)
 
469
#define is_semaphore_object(dh)         ((dh)->type == SemaphoreObject)
 
470
#define is_nt_thread_object(dh)         ((dh)->type == ThreadObject)
456
471
 
457
472
#define IO_TYPE_ADAPTER                         1
458
473
#define IO_TYPE_CONTROLLER                      2
1011
1026
                LONG irp_count;
1012
1027
                void *system_buffer;
1013
1028
        } associated_irp;
1014
 
        struct nt_list threads;
 
1029
        struct nt_list thread_list;
1015
1030
        struct io_status_block io_status;
1016
1031
        KPROCESSOR_MODE requestor_mode;
1017
1032
        BOOLEAN pending_returned;
1076
1091
 
1077
1092
#define IoSetNextIrpStackLocation(irp)                          \
1078
1093
do {                                                            \
 
1094
        KIRQL _irql_;                                           \
 
1095
        IoAcquireCancelSpinLock(&_irql_);                       \
1079
1096
        (irp)->current_location--;                              \
1080
1097
        IoGetCurrentIrpStackLocation(irp)--;                    \
 
1098
        IoReleaseCancelSpinLock(_irql_);                        \
1081
1099
} while (0)
1082
1100
 
1083
1101
#define IoSkipCurrentIrpStackLocation(irp)                      \
1084
1102
do {                                                            \
 
1103
        KIRQL _irql_;                                           \
 
1104
        IoAcquireCancelSpinLock(&_irql_);                       \
1085
1105
        (irp)->current_location++;                              \
1086
1106
        IoGetCurrentIrpStackLocation(irp)++;                    \
 
1107
        IoReleaseCancelSpinLock(_irql_);                        \
1087
1108
} while (0)
1088
1109
 
1089
1110
static inline void
1150
1171
        KeyValuePartialInformationAlign64
1151
1172
};
1152
1173
 
1153
 
struct object_attr {
1154
 
        ULONG length;
1155
 
        void *root_dir;
1156
 
        struct unicode_string *name;
1157
 
        ULONG attr;
1158
 
        void *security_descriptor;
1159
 
        void *security_qos;
1160
 
};
1161
 
 
1162
1174
struct file_name_info {
1163
1175
        ULONG length;
1164
1176
        wchar_t *name;
1359
1371
        struct object_attributes *attributes;
1360
1372
};
1361
1373
 
 
1374
enum section_inherit {
 
1375
        ViewShare = 1, ViewUnmap = 2
 
1376
};
 
1377
 
1362
1378
struct ksystem_time {
1363
1379
        ULONG low_part;
1364
1380
        LONG high1_time;