100+ results for 'kernel repo:linux'
Not the results you expected?
module_spec.rb (https://gitlab.com/essere.lab.public/qualitas.class-corpus) Ruby · 279 lines
parser.c (https://github.com/gby/linux.git) C · 336 lines
134 size_t len = s->to - s->from;
136 buf = kmalloc(len + 1, GFP_KERNEL);
137 if (!buf)
138 return -ENOMEM;
169 size_t len = s->to - s->from;
171 buf = kmalloc(len + 1, GFP_KERNEL);
172 if (!buf)
173 return -ENOMEM;
329 {
330 size_t sz = s->to - s->from + 1;
331 char *p = kmalloc(sz, GFP_KERNEL);
332 if (p)
333 match_strlcpy(p, s, sz);
clk-divider.c (https://github.com/tworaz/linux.git) C · 321 lines
ProjectsEntryWrapper.java (https://github.com/stevenjiancao/liferay-plugins.git) Java · 361 lines
LiferayAppDataService.java (https://github.com/stevenjiancao/liferay-plugins.git) Java · 296 lines
17 import com.liferay.opensocial.shindig.util.ShindigUtil;
18 import com.liferay.portal.kernel.log.Log;
19 import com.liferay.portal.kernel.log.LogFactoryUtil;
20 import com.liferay.portal.kernel.util.GetterUtil;
21 import com.liferay.portal.kernel.util.StringPool;
22 import com.liferay.portal.kernel.util.Validator;
23 import com.liferay.portal.model.User;
24 import com.liferay.portal.service.UserLocalServiceUtil;
HRUserTimeOffModel.java (https://github.com/stevenjiancao/liferay-plugins.git) Java · 325 lines
ProjectMDTest.h (https://github.com/wdzhou/mantid.git) C Header · 254 lines
8 #include "MantidAPI/IMDHistoWorkspace.h"
9 #include "MantidAPI/Run.h"
10 #include "MantidKernel/Property.h"
11 #include "MantidKernel/cow_ptr.h"
14 using namespace Mantid::API;
15 using namespace Mantid::Geometry;
16 using namespace Mantid::Kernel;
17 using namespace Mantid;
18 using namespace Mantid::DataObjects;
218 info = data->getExperimentInfo(0);
219 const Run r = info->run();
220 Mantid::Kernel::Property *p = r.getProperty("Gwendolin");
221 std::string cd = p->value();
222 found = cd.find("27.8");
GadgetServiceBaseImpl.java (https://github.com/l15k4/liferay-plugins.git) Java · 400 lines
26 import com.liferay.opensocial.service.persistence.OAuthTokenPersistence;
28 import com.liferay.portal.kernel.bean.BeanReference;
29 import com.liferay.portal.kernel.bean.IdentifiableBean;
30 import com.liferay.portal.kernel.dao.jdbc.SqlUpdate;
31 import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil;
32 import com.liferay.portal.kernel.exception.SystemException;
33 import com.liferay.portal.service.ResourceLocalService;
34 import com.liferay.portal.service.ResourceService;
AppLocalService.java (https://github.com/l15k4/liferay-plugins.git) Java · 256 lines
15 package com.liferay.marketplace.service;
17 import com.liferay.portal.kernel.exception.PortalException;
18 import com.liferay.portal.kernel.exception.SystemException;
19 import com.liferay.portal.kernel.transaction.Isolation;
20 import com.liferay.portal.kernel.transaction.Propagation;
21 import com.liferay.portal.kernel.transaction.Transactional;
22 import com.liferay.portal.service.PersistedModelLocalService;
53 public com.liferay.marketplace.model.App addApp(
54 com.liferay.marketplace.model.App app)
55 throws com.liferay.portal.kernel.exception.SystemException;
57 /**
hazards.h (https://gitlab.com/CadeLaRen/linux) C Header · 418 lines
speedtest.c (https://github.com/bergwolf/linux.git) C · 418 lines
NG4memcpy.S (https://gitlab.com/webhaikal/SenseiOneplus3) Assembly · 372 lines
CKEditorPluginManagerTest.php (https://gitlab.com/reasonat/test8) PHP · 159 lines
dgefa4.c (https://bitbucket.org/tisaac/petsc.git) C · 394 lines
14 #undef __FUNCT__
15 #define __FUNCT__ "PetscKernel_A_gets_inverse_A_4"
16 PETSC_EXTERN PetscErrorCode PetscKernel_A_gets_inverse_A_4(MatScalar *a,PetscReal shift)
151 #undef __FUNCT__
152 #define __FUNCT__ "PetscKernel_A_gets_inverse_A_4_SSE"
153 PETSC_EXTERN PetscErrorCode PetscKernel_A_gets_inverse_A_4_SSE(float *a)
cache-v6.S (https://github.com/bananacakes/bravo_2.6.35_gb-mr.git) Assembly · 354 lines
165 * to the page in question.
166 *
167 * - addr - kernel address
168 * - size - region size
169 */
307 /*
308 * dma_map_area(start, size, dir)
309 * - start - kernel virtual start address
310 * - size - size of region
311 * - dir - DMA direction
326 /*
327 * dma_unmap_area(start, size, dir)
328 * - start - kernel virtual start address
329 * - size - size of region
330 * - dir - DMA direction
SCFrameworkVersionPersistenceTest.java (https://github.com/kevincho/liferay-portal.git) Java · 258 lines
15 package com.liferay.portlet.softwarecatalog.service.persistence;
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.dao.orm.DynamicQuery;
19 import com.liferay.portal.kernel.dao.orm.DynamicQueryFactoryUtil;
20 import com.liferay.portal.kernel.dao.orm.ProjectionFactoryUtil;
21 import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil;
22 import com.liferay.portal.kernel.util.Time;
LiferayPortletURL.java (https://github.com/kevincho/liferay-portal.git) Java · 305 lines
crc32-vx.c (https://gitlab.com/Skylake/Staging) C · 314 lines
50 unsigned char const *data, size_t datalen) \
51 { \
52 struct kernel_fpu vxstate; \
53 unsigned long prealign, aligned, remaining; \
54 \
67 remaining = datalen & VX_ALIGN_MASK; \
68 \
69 kernel_fpu_begin(&vxstate, KERNEL_VXR_LOW); \
70 crc = ___crc32_vx(crc, data, aligned); \
71 kernel_fpu_end(&vxstate, KERNEL_VXR_LOW); \
Sweep_line_2_algorithms.h (https://gitlab.com/Namdhari/cgal-AnatoMeCo) C Header · 222 lines
54 template <typename Kernel>
55 struct Default_arr_traits<CGAL::Arr_segment_2<Kernel> >
56 {
57 typedef CGAL::Arr_segment_traits_2<Kernel> Traits;
65 };
67 template <typename Rat_kernel_, class Alg_kernel_, class Nt_traits_>
68 struct Default_arr_traits<CGAL::_Conic_arc_2<Rat_kernel_, Alg_kernel_,
69 Nt_traits_> >
70 {
71 typedef CGAL::Arr_conic_traits_2<Rat_kernel_, Alg_kernel_, Nt_traits_>
72 Traits;
73 };
75 template <typename Algebraic_kernel_>
76 struct Default_arr_traits<CGAL::Arr_rational_arc::Rational_arc_d_1<Algebraic_kernel_> >
77 {
78 typedef CGAL::Arr_rational_function_traits_2<Algebraic_kernel_> Traits;
test_p2t2_triangulation_prog1.cpp (https://gitlab.com/Namdhari/cgal-AnatoMeCo) C++ · 225 lines
3 #include <fstream>
5 #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
6 #include <CGAL/Periodic_2_triangulation_traits_2.h>
7 #include <CGAL/Periodic_2_triangulation_2.h>
9 struct K : CGAL::Exact_predicates_inexact_constructions_kernel {};
10 typedef CGAL::Periodic_2_triangulation_traits_2<K> Gt;
i2c-pasemi-core.c (https://gitlab.com/lszubowi/kernel-ark) C · 353 lines
event.h (https://github.com/srikard/linux.git) C Header · 415 lines
trsm_kernel_LN.c (https://github.com/nega0/gbp.git) C · 333 lines
43 #ifdef CONJ
44 #define GEMM_KERNEL GEMM_KERNEL_L
45 #else
46 #define GEMM_KERNEL GEMM_KERNEL_N
190 #if 0
191 fprintf(stderr, "TRSM KERNEL LN : m = %3ld n = %3ld k = %3ld offset = %3ld\n",
192 m, n, k, offset);
193 #endif
207 if (k - kk > 0) {
208 GEMM_KERNEL(i, GEMM_UNROLL_N, k - kk, dm1,
209 #ifdef COMPLEX
210 ZERO,
testLinearizer.cpp (https://github.com/nnormand/DGtal.git) C++ · 349 lines
sound_control_gpl.c (https://bitbucket.org/gideonx/bms-jb-3.4.y.git) C · 333 lines
Cargo.lock (https://gitlab.com/dwrensha1/fractalide) Cargo Lock · 278 lines
109 [[package]]
110 name = "kernel32-sys"
111 version = "0.2.2"
112 source = "registry+https://github.com/rust-lang/crates.io-index"
136 source = "registry+https://github.com/rust-lang/crates.io-index"
137 dependencies = [
138 "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
139 "lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
140 "target_build_utils 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
picture_psnr_enc.c (https://gitlab.com/godotengine/godot) C · 258 lines
82 const uint8_t* ref, int ref_stride,
83 int w, int h) {
84 const int w0 = (w < VP8_SSIM_KERNEL) ? w : VP8_SSIM_KERNEL;
85 const int w1 = w - VP8_SSIM_KERNEL - 1;
86 const int h0 = (h < VP8_SSIM_KERNEL) ? h : VP8_SSIM_KERNEL;
87 const int h1 = h - VP8_SSIM_KERNEL - 1;
98 }
99 for (; x < w1; ++x) {
100 const int off1 = x - VP8_SSIM_KERNEL + (y - VP8_SSIM_KERNEL) * src_stride;
101 const int off2 = x - VP8_SSIM_KERNEL + (y - VP8_SSIM_KERNEL) * ref_stride;
gain_analysis.o.d (https://gitlab.com/freedmpure/AndroidMp3Recorder-1) D · 122 lines
14 /Users/buihong_ha/workspace/android/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/asm/types.h \
15 /Users/buihong_ha/workspace/android/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/linux/types.h \
16 /Users/buihong_ha/workspace/android/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/machine/kernel.h \
17 /Users/buihong_ha/workspace/android/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/sysmacros.h \
18 /Users/buihong_ha/workspace/android/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/stdlib.h \
68 /Users/buihong_ha/workspace/android/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/linux/types.h:
70 /Users/buihong_ha/workspace/android/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/machine/kernel.h:
72 /Users/buihong_ha/workspace/android/android-ndk-r8b/platforms/android-9/arch-arm/usr/include/sys/sysmacros.h:
isr_wrap.s (https://gitlab.com/bluehole/myos-32bit) Assembly · 505 lines
475 ; This is our common ISR stub. It saves the processor state, sets
476 ; up for kernel mode segments, calls the C-level fault handler,
477 ; and finally restores the stack frame.
478 isr_common_stub:
482 push fs
483 push gs
484 mov ax, 0x10 ; Load the Kernel Data Segment descriptor!
485 mov ds, ax
486 mov es, ax
CommerceShippingOptionAccountEntryRelModel.java (https://github.com/ealonso/liferay-portal.git) Java · 252 lines
15 package com.liferay.commerce.model;
17 import com.liferay.portal.kernel.bean.AutoEscape;
18 import com.liferay.portal.kernel.model.AuditedModel;
19 import com.liferay.portal.kernel.model.BaseModel;
20 import com.liferay.portal.kernel.model.MVCCModel;
21 import com.liferay.portal.kernel.model.ShardedModel;
23 import java.util.Date;
Coords3D.java (https://github.com/ancsing/ggw.git) Java · 412 lines
rhospec.rb (https://github.com/raulvejar/rhodes.git) Ruby · 466 lines
byteorder.h (https://github.com/namebasedsockets/kernel.git) C Header · 372 lines
RegTest.c (https://github.com/aeste/freertos.git) C · 234 lines
31 distribute a combined work that includes FreeRTOS without being obliged to
32 provide the source code for proprietary components outside of the FreeRTOS
33 kernel. FreeRTOS is distributed in the hope that it will be useful, but
34 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
35 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
trmv_thread.c (https://github.com/nega0/gbp.git) C · 440 lines
76 #endif
78 static int trmv_kernel(blas_arg_t *args, BLASLONG *range_m, BLASLONG *range_n, FLOAT *dummy1, FLOAT *buffer, BLASLONG pos){
80 FLOAT *a, *x, *y;
350 queue[num_cpu].mode = mode;
351 queue[num_cpu].routine = trmv_kernel;
352 queue[num_cpu].args = &args;
353 queue[num_cpu].range_m = &range_m[MAX_CPU_NUMBER - num_cpu - 1];
389 queue[num_cpu].mode = mode;
390 queue[num_cpu].routine = trmv_kernel;
391 queue[num_cpu].args = &args;
392 queue[num_cpu].range_m = &range_m[num_cpu];
JIRAChangeItemWrapper.java (https://github.com/christine-huang/liferay-plugins.git) Java · 341 lines
walkProc.cc (https://github.com/ederc/Sources.git) C++ · 358 lines
3 ****************************************/
5 #include "kernel/mod2.h"
6 #include "kernel/structs.h"
7 #include "kernel/structs.h"
8 #include "kernel/polys.h"
9 #include "kernel/ideals.h"
10 #include "polys/monomials/ring.h"
11 #include "polys/monomials/maps.h"
12 #include "kernel/GBEngine/kstd1.h"
13 #include "kernel/fglm/fglm.h"
Mutation.java (https://github.com/ealonso/liferay-portal.git) Java · 326 lines
21 import com.liferay.petra.function.UnsafeConsumer;
22 import com.liferay.petra.function.UnsafeFunction;
23 import com.liferay.portal.kernel.search.Sort;
24 import com.liferay.portal.kernel.service.GroupLocalService;
25 import com.liferay.portal.kernel.service.RoleLocalService;
26 import com.liferay.portal.vulcan.accept.language.AcceptLanguage;
27 import com.liferay.portal.vulcan.batch.engine.resource.VulcanBatchEngineImportTaskResource;
314 private AcceptLanguage _acceptLanguage;
315 private com.liferay.portal.kernel.model.Company _company;
316 private GroupLocalService _groupLocalService;
317 private HttpServletRequest _httpServletRequest;
320 private BiFunction<Object, String, Sort[]> _sortsBiFunction;
321 private UriInfo _uriInfo;
322 private com.liferay.portal.kernel.model.User _user;
323 private VulcanBatchEngineImportTaskResource
324 _vulcanBatchEngineImportTaskResource;
fastconv.hpp (https://github.com/somaproject/thirdparty-packages.git) C++ Header · 298 lines
73 Fastconv_base(length_type const input_size, bool transform_kernel)
74 : size_ (input_size),
75 transform_kernel_(transform_kernel)
76 {
77 assert(rt_valid_size(this->size_));
128 length_type rows = in.size(0);
129 fconv(ext_in.data(), ext_kernel.data(), ext_out.data(), rows, out.size(1), transform_kernel_);
130 }
288 typedef Matrix<T, kernel_block_type> kernel_view_type;
290 kernel_view_type kernel_;
291 };
JIRAActionClp.java (https://github.com/lululiferay/liferay-plugins.git) Java · 360 lines
token.p (https://github.com/Spicery/spice.git) Prolog · 305 lines
20 };
22 define newAnySynProps( style, opener, closer, rank, kernel );
23 lvars is_brackets = ( style == "FxendF" or style == "endF" );
24 if opener then
38 mishap( 'Invalid style', [ ^style ] )
39 endunless;
40 unless kernel.isKernel do
41 mishap( 'Invalid kernel', [ ^kernel ] )
42 endunless;
43 consSynProps( style, opener, closer, rank, kernel )
44 enddefine;
46 define newOpSynProps( style, rank, kernel );
47 newAnySynProps( style, false, false, rank, kernel )
48 enddefine;
head.S (https://github.com/himikof/yallos.git) Assembly · 401 lines
kernel.asm (https://github.com/lingod01/lingod.git) Assembly · 359 lines
2 ; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 ; kernel.asm
4 ; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 ; Forrest Yu, 2005
11 ; 导入函数
12 extern cstart
13 extern kernel_main
14 extern exception_handler
15 extern spurious_irq
90 ; ┃■■■■■■■KERNEL.BIN■■■■■■┃
91 ; 80000h ┣━━━━━━━━━━━━━━━━━━┫
92 ; ┃■■■■■■■■KERNEL■■■■■■■┃ 30400h ← KERNEL 入口 (KernelEntryPointPhyAddr)
93 ; 30000h ┣━━━━━━━━━━━━━━━━━━┫
94 ; ┋ ... ┋
msm8k_ard_adie.c (https://github.com/drakaz/GalaxoKernel.git) C · 442 lines
spinlock.h (https://github.com/kernel-digger/linux.git) C Header · 428 lines
ieee1394_core.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 1381 lines
✨ Summary
This C code implements a Linux kernel module for IEEE 1394 (FireWire) bus communication. It provides functions for sending and receiving packets, managing packet completion tasks, and interacting with the bus. The code also includes support for various protocols, such as high-level and low-level transactions, and device management. It is designed to work with the FireWire hardware interface on Linux systems.
This C code implements a Linux kernel module for IEEE 1394 (FireWire) bus communication. It provides functions for sending and receiving packets, managing packet completion tasks, and interacting with the bus. The code also includes support for various protocols, such as high-level and low-level transactions, and device management. It is designed to work with the FireWire hardware interface on Linux systems.
xfs_ag.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C Header · 254 lines
✨ Summary
This C header file defines a set of data structures and constants for the XFS (extensible filesystem) implementation. It provides definitions for various components, such as allocation groups, inode radix trees, and file system blocks, which are used to manage the filesystem’s metadata and data storage. The code is part of the Linux kernel’s XFS module.
This C header file defines a set of data structures and constants for the XFS (extensible filesystem) implementation. It provides definitions for various components, such as allocation groups, inode radix trees, and file system blocks, which are used to manage the filesystem’s metadata and data storage. The code is part of the Linux kernel’s XFS module.
xfs_filestream.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 137 lines
✨ Summary
This C header file defines a set of functions and macros for managing filestream associations with allocation groups (AGs) on an XFS filesystem. It provides atomic counters to track active filestreams, ensuring that no invalid references exist in the cache. The code also includes prototypes for various filestream-related functions and constants for allocation selection flags.
This C header file defines a set of functions and macros for managing filestream associations with allocation groups (AGs) on an XFS filesystem. It provides atomic counters to track active filestreams, ensuring that no invalid references exist in the cache. The code also includes prototypes for various filestream-related functions and constants for allocation selection flags.
lgpl-2.1.txt (https://bitbucket.org/ultra_iter/qt-vtl.git) Plain Text · 504 lines
321 the materials to be distributed need not include anything that is
322 normally distributed (in either source or binary form) with the major
323 components (compiler, kernel, and so on) of the operating system on
324 which the executable runs, unless that component itself accompanies
325 the executable.
cnic_defs.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 581 lines
✨ Summary
This C++ header file defines a set of structures and constants for a network protocol, specifically for handling Keyed-Word Queued Encapsulations (KWQE). It provides definitions for various KWQE requests, including updating PG connections, uploading contexts, and others. The structures contain fields that represent the protocol’s parameters, such as flags, operation codes, and data addresses.
This C++ header file defines a set of structures and constants for a network protocol, specifically for handling Keyed-Word Queued Encapsulations (KWQE). It provides definitions for various KWQE requests, including updating PG connections, uploading contexts, and others. The structures contain fields that represent the protocol’s parameters, such as flags, operation codes, and data addresses.
13 #define CNIC_DEFS_H
15 /* KWQ (kernel work queue) request op codes */
16 #define L2_KWQE_OPCODE_VALUE_FLUSH (4)
35 #define L5CM_RAMROD_CMD_ID_TERMINATE_OFFLOAD (L5CM_RAMROD_CMD_ID_BASE + 15)
37 /* KCQ (kernel completion queue) response op codes */
38 #define L4_KCQE_OPCODE_VALUE_CLOSE_COMP (53)
39 #define L4_KCQE_OPCODE_VALUE_RESET_COMP (54)
48 #define L4_KCQE_OPCODE_VALUE_UPLOAD_PG (14)
50 /* KCQ (kernel completion queue) completion status */
51 #define L4_KCQE_COMPLETION_STATUS_SUCCESS (0)
52 #define L4_KCQE_COMPLETION_STATUS_TIMEOUT (0x93)
sb1250-mac.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 2956 lines
✨ Summary
This C code implements a Linux driver for a specific type of Ethernet controller. It registers platform devices for each available unit, sets their MAC addresses, and provides a way to probe and remove them. The driver is designed to work with various System-on-Chip (SoC) types and can be used in a variety of applications, such as networking or embedded systems.
This C code implements a Linux driver for a specific type of Ethernet controller. It registers platform devices for each available unit, sets their MAC addresses, and provides a way to probe and remove them. The driver is designed to work with various System-on-Chip (SoC) types and can be used in a variety of applications, such as networking or embedded systems.
27 #include <linux/bug.h>
28 #include <linux/module.h>
29 #include <linux/kernel.h>
30 #include <linux/string.h>
31 #include <linux/timer.h>
659 d->sbdma_dscrtable_unaligned = kcalloc(d->sbdma_maxdescr + 1,
660 sizeof(*d->sbdma_dscrtable),
661 GFP_KERNEL);
663 /*
679 d->sbdma_ctxtable = kcalloc(d->sbdma_maxdescr,
680 sizeof(*d->sbdma_ctxtable), GFP_KERNEL);
682 #ifdef CONFIG_SBMAC_COALESCE
lm77 (http://omnia2droid.googlecode.com/svn/trunk/) Unknown · 23 lines
boot.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 1847 lines
✨ Summary
This C code is part of the Linux kernel’s ACPI (Advanced Configuration and Power Interface) subsystem. It initializes and configures various ACPI-related parameters, such as enabling or disabling ACPI features, setting interrupt routing, and configuring system clock sources. The code also handles command-line arguments to control these settings during boot time.
This C code is part of the Linux kernel’s ACPI (Advanced Configuration and Power Interface) subsystem. It initializes and configures various ACPI-related parameters, such as enabling or disabling ACPI features, setting interrupt routing, and configuring system clock sources. The code also handles command-line arguments to control these settings during boot time.
520 buffer.pointer = NULL;
522 if (!alloc_cpumask_var(&tmp_map, GFP_KERNEL))
523 goto out;
525 if (!alloc_cpumask_var(&new_map, GFP_KERNEL))
526 goto free_tmp_map;
646 printk(KERN_WARNING PREFIX "HPET id: %#x "
647 "base: 0xfed0000000000000 is bogus\n "
648 "try hpet=force on the kernel command line to "
649 "fix it up to 0xfed00000.\n", hpet_tbl->id);
650 hpet_address = 0;
k8.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 124 lines
✨ Summary
This C code provides support for AMD K8 northbridges and their derivatives, including cache flushing and device identification. It initializes data structures to store information about these devices, caches their configuration, and provides functions to flush cached data from the northbridge’s graphics acceleration (GART) memory. The code is designed to work with Linux kernel modules.
This C code provides support for AMD K8 northbridges and their derivatives, including cache flushing and device identification. It initializes data structures to store information about these devices, caches their configuration, and provides functions to flush cached data from the northbridge’s graphics acceleration (GART) memory. The code is designed to work with Linux kernel modules.
xt_quota.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 21 lines
✨ Summary
This C header file defines a quota system for network traffic. It includes an enumeration of flags, a mask, and a structure to hold quota information, including flags, padding, a 64-bit quota value, and a pointer to a private data structure. The quota can be inverted using the XT_QUOTA_INVERT flag.
This C header file defines a quota system for network traffic. It includes an enumeration of flags, a mask, and a structure to hold quota information, including flags, padding, a 64-bit quota value, and a pointer to a private data structure. The quota can be inverted using the XT_QUOTA_INVERT flag.
FESpecularLighting.cpp (https://bitbucket.org/ultra_iter/qt-vtl.git) C++ · 158 lines
35 float kernelUnitLengthY, PassRefPtr<LightSource> lightSource)
36 : FELighting(filter, SpecularLighting, lightingColor, surfaceScale, 0, specularConstant, specularExponent, kernelUnitLengthX, kernelUnitLengthY, lightSource)
37 {
38 }
40 PassRefPtr<FESpecularLighting> FESpecularLighting::create(Filter* filter, const Color& lightingColor,
41 float surfaceScale, float specularConstant, float specularExponent,
42 float kernelUnitLengthX, float kernelUnitLengthY, PassRefPtr<LightSource> lightSource)
43 {
44 return adoptRef(new FESpecularLighting(filter, lightingColor, surfaceScale, specularConstant, specularExponent,
107 }
109 bool FESpecularLighting::setKernelUnitLengthX(float kernelUnitLengthX)
110 {
111 if (m_kernelUnitLengthX == kernelUnitLengthX)
112 return false;
113 m_kernelUnitLengthX = kernelUnitLengthX;
114 return true;
115 }
packet_history.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 490 lines
✨ Summary
This C code implements a timestamp-based congestion control algorithm for TCP-like protocols, specifically DCCP (Datagram Congestion Control Protocol). It manages a ring buffer to store timestamp and CCVal values, sampling RTT (Round-Trip Time) from these values to adjust congestion control parameters. The code provides functions for allocating and purging the ring buffer, as well as computing RTT samples based on timestamp and CCVal values.
This C code implements a timestamp-based congestion control algorithm for TCP-like protocols, specifically DCCP (Datagram Congestion Control Protocol). It manages a ring buffer to store timestamp and CCVal values, sampling RTT (Round-Trip Time) from these values to adjust congestion control parameters. The code provides functions for allocating and purging the ring buffer, as well as computing RTT samples based on timestamp and CCVal values.
inotify_fsnotify.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 169 lines
✨ Summary
This C code implements inotify support for userspace, allowing user applications to receive notifications about file system events such as creation, modification, and deletion. It manages a data structure that tracks these events and notifies registered handlers when an event occurs. The code provides functions for handling events, freeing resources, and managing the underlying data structures.
This C code implements inotify support for userspace, allowing user applications to receive notifications about file system events such as creation, modification, and deletion. It manages a data structure that tracks these events and notifies registered handlers when an event occurs. The code provides functions for handling events, freeing resources, and managing the underlying data structures.
twofish.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 215 lines
✨ Summary
This C code implements a Twofish cipher algorithm for encryption and decryption of blocks of data. It provides a generic driver for the Twofish algorithm, which can be used in various cryptographic applications. The code defines a struct twofish_ctx
to hold the algorithm’s state, and functions twofish_encrypt
and twofish_decrypt
to perform the encryption and decryption operations, respectively.
This C code implements a Twofish cipher algorithm for encryption and decryption of blocks of data. It provides a generic driver for the Twofish algorithm, which can be used in various cryptographic applications. The code defines a struct twofish_ctx
to hold the algorithm’s state, and functions twofish_encrypt
and twofish_decrypt
to perform the encryption and decryption operations, respectively.
types.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 210 lines
✨ Summary
This C header file defines various data types used in Linux kernel programming, including integer and pointer types, bit manipulation types, and file system-related types. It provides a set of standardized types that can be used by both kernel code and user-space applications to ensure compatibility and avoid type collisions. The definitions are tailored for the Linux operating system and its specific architecture.
This C header file defines various data types used in Linux kernel programming, including integer and pointer types, bit manipulation types, and file system-related types. It provides a set of standardized types that can be used by both kernel code and user-space applications to ensure compatibility and avoid type collisions. The definitions are tailored for the Linux operating system and its specific architecture.
6 #ifndef __ASSEMBLY__
7 #ifdef __KERNEL__
9 #define DECLARE_BITMAP(name,bits) \
14 #include <linux/posix_types.h>
16 #ifdef __KERNEL__
18 typedef __u32 __kernel_dev_t;
20 typedef __kernel_fd_set fd_set;
21 typedef __kernel_dev_t dev_t;
22 typedef __kernel_ino_t ino_t;
23 typedef __kernel_mode_t mode_t;
if_tunnel.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 73 lines
✨ Summary
This C header file defines a set of constants, structures, and macros for IP tunneling, specifically GRE (Generic Routing Encapsulation) tunnels. It provides definitions for tunnel parameters, flags, and protocol-related values, as well as functions to manage these tunnels. The code is likely used in Linux kernel development or network programming applications.
This C header file defines a set of constants, structures, and macros for IP tunneling, specifically GRE (Generic Routing Encapsulation) tunnels. It provides definitions for tunnel parameters, flags, and protocol-related values, as well as functions to manage these tunnels. The code is likely used in Linux kernel development or network programming applications.
firewire.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 433 lines
✨ Summary
This is a Linux kernel header file that provides an interface for interacting with FireWire (IEEE 1394) devices. It defines data structures and functions for sending and receiving packets, managing transactions, and handling ISO packet formats. The code allows users to access and control FireWire devices from the operating system.
This is a Linux kernel header file that provides an interface for interacting with FireWire (IEEE 1394) devices. It defines data structures and functions for sending and receiving packets, managing transactions, and handling ISO packet formats. The code allows users to access and control FireWire devices from the operating system.
5 #include <linux/device.h>
6 #include <linux/dma-mapping.h>
7 #include <linux/kernel.h>
8 #include <linux/kref.h>
9 #include <linux/list.h>
390 * An iso buffer is just a set of pages mapped for DMA in the
391 * specified direction. Since the pages are to be used for DMA, they
392 * are not mapped into the kernel virtual address space. We store the
393 * DMA address in the page private. The helper function
394 * fw_iso_buffer_map() will map the pages into a given vma.
mutex.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 156 lines
✨ Summary
This C header file defines a mutex (mutual exclusion) lock data structure and associated functions for synchronization in Linux kernel programming. It provides basic locking mechanisms, including initialization, locking, unlocking, and waiting, as well as debugging features for tracking locks and detecting potential issues. The code is designed to be used by the Linux kernel and other applications that require thread-level synchronization.
This C header file defines a mutex (mutual exclusion) lock data structure and associated functions for synchronization in Linux kernel programming. It provides basic locking mechanisms, including initialization, locking, unlocking, and waiting, as well as debugging features for tracking locks and detecting potential issues. The code is designed to be used by the Linux kernel and other applications that require thread-level synchronization.
opl3.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 1251 lines
✨ Summary
This C code implements a driver for Yamaha OPL3 and OPL4 FM synthesizers, specifically the YM3812 chip used in older Yamaha consoles. It provides an interface to control the synthesizer’s parameters and registers, allowing users to load and manipulate audio data. The code is part of the Linux kernel and can be loaded as a module or compiled into the kernel itself.
This C code implements a driver for Yamaha OPL3 and OPL4 FM synthesizers, specifically the YM3812 chip used in older Yamaha consoles. It provides an interface to control the synthesizer’s parameters and registers, allowing users to load and manipulate audio data. The code is part of the Linux kernel and can be loaded as a module or compiled into the kernel itself.
mixer_oss.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 1402 lines
✨ Summary
This C code implements a Linux kernel module for the ALSA (Advanced Linux Sound Architecture) sound system, specifically for OSS (Open Sound System) devices. It registers and manages OSS mixer devices, allowing users to interact with them through ioctl calls. The module initializes and exits when loaded/unloaded, and provides a way to notify handlers of changes to the mixer devices.
This C code implements a Linux kernel module for the ALSA (Advanced Linux Sound Architecture) sound system, specifically for OSS (Open Sound System) devices. It registers and manages OSS mixer devices, allowing users to interact with them through ioctl calls. The module initializes and exits when loaded/unloaded, and provides a way to notify handlers of changes to the mixer devices.
53 if (err < 0)
54 return err;
55 fmixer = kzalloc(sizeof(*fmixer), GFP_KERNEL);
56 if (fmixer == NULL) {
57 snd_card_file_remove(card, file);
515 return;
516 }
517 uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
518 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
553 return;
554 }
555 uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
556 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
616 if ((kctl = snd_ctl_find_numid(card, numid)) == NULL)
617 return;
618 uinfo = kzalloc(sizeof(*uinfo), GFP_KERNEL);
619 uctl = kzalloc(sizeof(*uctl), GFP_KERNEL);
kernel-docs.txt (http://photon-android.googlecode.com/svn/) Plain Text · 762 lines
304 * Title: "The Kernel Hacking HOWTO"
305 Author: Various Talented People, and Rusty.
306 Location: in kernel tree, Documentation/DocBook/kernel-hacking/
307 (must be built as "make {htmldocs | psdocs | pdfdocs})
308 Keywords: HOWTO, kernel contexts, deadlock, locking, modules,
324 Keywords: ALSA, sound, soundcard, driver, lowlevel, hardware.
325 Description: Advanced Linux Sound Architecture for developers,
326 both at kernel and user-level sides. ALSA is the Linux kernel
327 sound architecture in the 2.6 kernel version.
355 * Title: "Linux Kernel Locking HOWTO"
356 Author: Various Talented People, and Rusty.
357 Location: in kernel tree, Documentation/DocBook/kernel-locking/
358 (must be built as "make {htmldocs | psdocs | pdfdocs})
359 Keywords: locks, locking, spinlock, semaphore, atomic, race
685 URL: http://kt.zork.net/kernel-traffic/
686 Keywords: linux-kernel mailing list, weekly kernel news.
687 Description: Weekly newsletter covering the most relevant
688 discussions of the linux-kernel mailing list.
entry.S
(http://omnia2droid.googlecode.com/svn/trunk/)
Assembly · 1116 lines
✨ Summary
This Assembly code is part of a Linux kernel implementation, specifically the system call handling mechanism. It defines a table of system calls and their corresponding handlers, which are executed when a system call is made by user space. The code also includes constants for integer and symbol values used in the system call handling process.
This Assembly code is part of a Linux kernel implementation, specifically the system call handling mechanism. It defines a table of system calls and their corresponding handlers, which are executed when a system call is made by user space. The code also includes constants for integer and symbol values used in the system call handling process.
231 st %r3,__LC_THREAD_INFO
232 ahi %r3,STACK_SIZE
233 st %r3,__LC_KERNEL_STACK # __LC_KERNEL_STACK = new kernel stack
234 br %r14
433 #
434 # kernel_execve function needs to deal with pt_regs that is not
435 # at the usual place
436 #
437 .globl kernel_execve
438 kernel_execve:
439 stm %r12,%r15,48(%r15)
440 lr %r14,%r15
807 tm SP_PSW+1(%r15),0x01 # returning to user ?
808 bno BASED(mcck_return)
809 l %r1,__LC_KERNEL_STACK # switch to kernel stack
810 s %r1,BASED(.Lc_spsize)
811 mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15)
traps.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 768 lines
✨ Summary
This C code defines a set of exception handlers for a Linux kernel, which are triggered when specific conditions occur during execution. The handlers catch and handle exceptions such as stack overflows, division by zero, and data corruption, among others. They print error messages, trigger system calls, and perform other necessary actions to prevent the program from crashing or causing further damage.
This C code defines a set of exception handlers for a Linux kernel, which are triggered when specific conditions occur during execution. The handlers catch and handle exceptions such as stack overflows, division by zero, and data corruption, among others. They print error messages, trigger system calls, and perform other necessary actions to prevent the program from crashing or causing further damage.
1 /*
2 * arch/s390/kernel/traps.c
3 *
4 * S390 version
7 * Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com),
8 *
9 * Derived from "arch/i386/kernel/traps.c"
10 * Copyright (C) 1991, 1992 Linus Torvalds
11 */
16 */
17 #include <linux/sched.h>
18 #include <linux/kernel.h>
19 #include <linux/string.h>
20 #include <linux/errno.h>
73 /*
74 * For show_trace we have tree different stack to consider:
75 * - the panic stack which is used if the kernel stack has overflown
76 * - the asynchronous interrupt stack (cpu related)
77 * - the synchronous kernel stack (process related)
tsx09-common.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 135 lines
✨ Summary
This C code is part of a Linux driver for QNAP TS-x09 boards, specifically handling power-off and Ethernet configuration. It defines functions to trigger power-off via UART1-attached PIC and parse MAC addresses from flash memory. The code also initializes the Ethernet platform data structure with the PHY address and provides functions to check and extract MAC addresses from a file in the flash partition.
This C code is part of a Linux driver for QNAP TS-x09 boards, specifically handling power-off and Ethernet configuration. It defines functions to trigger power-off via UART1-attached PIC and parse MAC addresses from flash memory. The code also initializes the Ethernet platform data structure with the PHY address and provides functions to check and extract MAC addresses from a file in the flash partition.
pwm-clock.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 436 lines
✨ Summary
This C code initializes and configures PWM (Pulse Width Modulation) clocks for a SoC (System-on-Chip). It sets up parent-child relationships between clocks, registers PWM scaler, tclk, and tdiv clocks, and tin clocks with the SoC’s clock tree. The code is part of an arch_initcall function, indicating it’s executed early in the boot process to ensure proper clock configuration for the system.
This C code initializes and configures PWM (Pulse Width Modulation) clocks for a SoC (System-on-Chip). It sets up parent-child relationships between clocks, registers PWM scaler, tclk, and tdiv clocks, and tin clocks with the SoC’s clock tree. The code is part of an arch_initcall function, indicating it’s executed early in the boot process to ensure proper clock configuration for the system.
wpactl.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 992 lines
✨ Summary
This C code implements a Wi-Fi driver for Linux, specifically for WPA (Wi-Fi Protected Access) supplicant devices. It handles various commands to interact with the wireless network interface, such as setting up WPA parameters, scanning for nearby networks, and associating with a specific network. The code uses kernel-mode functions and data structures to manage the Wi-Fi connection.
This C code implements a Wi-Fi driver for Linux, specifically for WPA (Wi-Fi Protected Access) supplicant devices. It handles various commands to interact with the wireless network interface, such as setting up WPA parameters, scanning for nearby networks, and associating with a specific network. The code uses kernel-mode functions and data structures to manage the Wi-Fi connection.
200 */
202 int wpa_set_keys(PSDevice pDevice, void *ctx, BOOL fcpfkernel)
203 {
204 struct viawget_wpa_param *param=ctx;
232 //spin_unlock_irq(&pDevice->lock);
233 if(param->u.wpa_key.key && fcpfkernel) {
234 memcpy(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len);
235 }
273 //spin_unlock_irq(&pDevice->lock);
274 if(param->u.wpa_key.seq && fcpfkernel) {
275 memcpy(&abySeq[0], param->u.wpa_key.seq, param->u.wpa_key.seq_len);
276 }
mmzone.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 51 lines
✨ Summary
This C header file defines platform-specific memory management functions for the SH architecture, specifically for handling multiple nodes and bootmem allocation. It provides inline functions to map physical frame numbers (PFNs) to node IDs and pglist data structures, as well as setup functions for bootmem initialization and allocator configuration.
This C header file defines platform-specific memory management functions for the SH architecture, specifically for handling multiple nodes and bootmem allocation. It provides inline functions to map physical frame numbers (PFNs) to node IDs and pglist data structures, as well as setup functions for bootmem initialization and allocator configuration.
2 #define __ASM_SH_MMZONE_H
4 #ifdef __KERNEL__
6 #ifdef CONFIG_NEED_MULTIPLE_NODES
42 void __init plat_mem_setup(void);
44 /* arch/sh/kernel/setup.c */
45 void __init setup_bootmem_allocator(unsigned long start_pfn);
46 void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
47 unsigned long end_pfn);
49 #endif /* __KERNEL__ */
50 #endif /* __ASM_SH_MMZONE_H */
x11.factor (git://github.com/x6j8x/factor.git) Unknown · 109 lines
lpfc_sli.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 11728 lines
✨ Summary
This C code is part of a Linux driver for a network interface card (NIC). It reads configuration data from the NIC and checks if certain ports are enabled or disabled. Specifically, it verifies the presence of a “PORT_STE” sub-TLV in the configuration region 23, which indicates whether the port is enabled or not. If the port is disabled, it sets a flag to indicate this.
This C code is part of a Linux driver for a network interface card (NIC). It reads configuration data from the NIC and checks if certain ports are enabled or disabled. Specifically, it verifies the presence of a “PORT_STE” sub-TLV in the configuration region 23, which indicates whether the port is enabled or not. If the port is disabled, it sets a flag to indicate this.
824 int i, rc, ret = 0;
826 pmb = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
827 if (!pmb)
828 return -ENOMEM;
989 spin_unlock_irq(&phba->hbalock);
990 new_arr = kzalloc(new_len * sizeof (struct lpfc_iocbq *),
991 GFP_KERNEL);
992 if (new_arr) {
993 spin_lock_irq(&phba->hbalock);
time.c
(http://photon-android.googlecode.com/svn/)
C · 152 lines
✨ Summary
This C code initializes a clock source for an Atmel AVR32 microcontroller, specifically the COUNT register. It sets up a clock event device to measure time intervals and generates interrupts at regular intervals. The clock source is rated as low quality due to potential issues with sleep states and CPU frequency changes. The code also prints information about the clock source and its associated IRQ.
This C code initializes a clock source for an Atmel AVR32 microcontroller, specifically the COUNT register. It sets up a clock event device to measure time intervals and generates interrupts at regular intervals. The clock source is rated as low quality due to potential issues with sleep states and CPU frequency changes. The code also prints information about the clock source and its associated IRQ.
mkmakefile
(http://omnia2droid.googlecode.com/svn/trunk/)
Shell · 51 lines
✨ Summary
This shell script generates a Makefile for a specific kernel source directory and output directory, based on provided version and patchlevel information. It checks if an existing Makefile exists in the output directory, and only overwrites it if necessary. The generated Makefile allows for building external modules and uses the make
command to compile the kernel.
This shell script generates a Makefile for a specific kernel source directory and output directory, based on provided version and patchlevel information. It checks if an existing Makefile exists in the output directory, and only overwrites it if necessary. The generated Makefile allows for building external modules and uses the make
command to compile the kernel.
6 # Usage
7 # $1 - Kernel src directory
8 # $2 - Output directory
9 # $3 - version
13 test ! -r $2/Makefile -o -O $2/Makefile || exit 0
14 # Only overwrite automatically generated Makefiles
15 # (so we do not overwrite kernel Makefile)
16 if test -e $2/Makefile && ! grep -q Automatically $2/Makefile
17 then
mpc834x_itx.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 114 lines
✨ Summary
This C code defines a Linux machine driver for the MPC834x ITX board, a variant of the PowerPC processor. It sets up the architecture, initializes interrupts, and detects compatibility with the device tree. The code also includes functions to probe the system, set up the PCI bus, and initialize USB configuration. It is part of the Linux kernel’s machine driver framework.
This C code defines a Linux machine driver for the MPC834x ITX board, a variant of the PowerPC processor. It sets up the architecture, initializes interrupts, and detects compatibility with the device tree. The code also includes functions to probe the system, set up the PCI bus, and initialize USB configuration. It is part of the Linux kernel’s machine driver framework.
semaphores.factor (git://github.com/abeaumont/factor.git) Unknown · 39 lines
package.rkt
(git://github.com/gmarceau/PLT.git)
Racket · 445 lines
✨ Summary
This Racket code defines a set of syntaxes for working with packages, which are essentially namespaces that can be used to organize and export functions and variables. The define-package
and package-begin
macros create new packages, while the open-package
and open*-package
macros open existing ones. The do-open
macro is a helper function for defining these syntaxes. It allows users to define package-related syntaxes in a concise way.
This Racket code defines a set of syntaxes for working with packages, which are essentially namespaces that can be used to organize and export functions and variables. The define-package
and package-begin
macros create new packages, while the open-package
and open*-package
macros open existing ones. The do-open
macro is a helper function for defining these syntaxes. It allows users to define package-related syntaxes in a concise way.
151 id
152 def-ctxes))]
153 [kernel-forms (list*
154 #'-define*-values
155 #'-define*-syntaxes
156 (kernel-form-identifier-list))]
157 [init-exprs (syntax->list #'(form ...))]
158 [new-bindings (make-bound-identifier-mapping)]
298 (let ([expr (local-expand (car exprs)
299 ctx
300 kernel-forms
301 def-ctxes)])
302 (syntax-case expr (begin)
addrspace.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 65 lines
✨ Summary
This C header file defines address spaces for SH CPUs, specifically the SuperH processor family. It provides macros to manipulate addresses and determine if an address can be reached in 29 bits. The code is specific to the SH-4 processor and its store queues, providing a way to map addresses to different segments and check their validity.
This C header file defines address spaces for SH CPUs, specifically the SuperH processor family. It provides macros to manipulate addresses and determine if an address can be reached in 29 bits. The code is specific to the SH-4 processor and its store queues, providing a way to map addresses to different segments and check their validity.
11 #define __ASM_SH_ADDRSPACE_H
13 #ifdef __KERNEL__
15 #include <cpu/addrspace.h>
20 /*
21 [ P0/U0 (virtual) ] 0x00000000 <------ User space
22 [ P1 (fixed) cached ] 0x80000000 <------ Kernel space
23 [ P2 (fixed) non-cachable] 0xA0000000 <------ Physical access
24 [ P3 (virtual) cached] 0xC0000000 <------ vmalloced area
61 #endif
63 #endif /* __KERNEL__ */
64 #endif /* __ASM_SH_ADDRSPACE_H */
test_iplconvkernel.rb
(git://github.com/ryanfb/ruby-opencv.git)
Ruby · 54 lines
✨ Summary
This Ruby code defines a test suite for OpenCV’s IplConvKernel
class, which represents a convolution kernel used in image processing. The tests verify that kernels can be created with different shapes and values, and that invalid arguments raise errors. It also checks the size and anchor of the kernel, ensuring they match the expected values.
This Ruby code defines a test suite for OpenCV’s IplConvKernel
class, which represents a convolution kernel used in image processing. The tests verify that kernels can be created with different shapes and values, and that invalid arguments raise errors. It also checks the size and anchor of the kernel, ensuring they match the expected values.
11 def test_initialize
12 [:rect, :cross, :ellipse, CV_SHAPE_RECT, CV_SHAPE_CROSS, CV_SHAPE_ELLIPSE].each { |shape|
13 kernel = IplConvKernel.new(5, 5, 2, 2, shape)
14 assert_not_nil(kernel)
17 values = [1] * 25
18 [:custom, CV_SHAPE_CUSTOM].each { |shape|
19 kernel = IplConvKernel.new(5, 5, 2, 2, shape, values)
20 assert_not_nil(kernel)
34 def test_size
35 kernel = IplConvKernel.new(5, 4, 2, 2, :rect)
36 size = kernel.size
44 def test_anchor
45 kernel = IplConvKernel.new(5, 4, 3, 2, :rect)
46 a = kernel.anchor
machdep.c
(https://bitbucket.org/freebsd/freebsd-head/)
C · 785 lines
✨ Summary
This is a function that initializes a struct pcpu. It takes two arguments: pcpu, which is a pointer to a struct pcpu, and sz, which is the size of the struct pcpu. The function copies the SLB contents from the current CPU to the new struct pcpu.
This is a function that initializes a struct pcpu. It takes two arguments: pcpu, which is a pointer to a struct pcpu, and sz, which is the size of the struct pcpu. The function copies the SLB contents from the current CPU to the new struct pcpu.
252 uintptr_t
253 powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel,
254 vm_offset_t basekernel, void *mdp)
294 boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
295 kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
296 endkernel = ulmax(endkernel, MD_FETCH(kmdp,
297 MODINFOMD_KERNEND, vm_offset_t));
298 #ifdef DDB
422 /* Make sure the kernel icache is valid before we go too much further */
423 __syncicache((caddr_t)startkernel, endkernel - startkernel);
425 #ifndef __powerpc64__
555 pmap_mmu_install(MMU_TYPE_OEA, BUS_PROBE_GENERIC);
557 pmap_bootstrap(startkernel, endkernel);
558 mtmsr(PSL_KERNSET & ~PSL_EE);
symlink.c
(http://photon-android.googlecode.com/svn/)
C · 318 lines
✨ Summary
This C code implements a symlink file system operation for Linux. It allows creating and deleting symlinks, as well as following links to their target locations. The code provides functions for handling symlink operations, including configfs_getlink
for getting the path of a linked file, configfs_follow_link
for following a link, and configfs_put_link
for releasing resources when a link is no longer needed.
This C code implements a symlink file system operation for Linux. It allows creating and deleting symlinks, as well as following links to their target locations. The code provides functions for handling symlink operations, including configfs_getlink
for getting the path of a linked file, configfs_follow_link
for following a link, and configfs_put_link
for releasing resources when a link is no longer needed.
lapb_iface.c
(http://photon-android.googlecode.com/svn/)
C · 450 lines
✨ Summary
This C code implements the X.25 Link Access Procedure B (LAPB) link layer protocol for Linux. It provides functions for registering and unregistering LAPB devices, handling connection establishment and termination, data transmission and reception, and error handling. The code is designed to be used with the Linux kernel’s networking subsystem.
This C code implements the X.25 Link Access Procedure B (LAPB) link layer protocol for Linux. It provides functions for registering and unregistering LAPB devices, handling connection establishment and termination, data transmission and reception, and error handling. The code is designed to be used with the Linux kernel’s networking subsystem.
callback.c
(http://photon-android.googlecode.com/svn/)
C · 478 lines
✨ Summary
This C code implements a callback update process for a distributed file system, specifically for the Kerberos Authentication Service (KAS). It manages callbacks between the KAS and its clients, ensuring that updates are propagated correctly across the network. The code handles tasks such as updating vnode states, discarding expired callbacks, and rescheduling updates to minimize latency.
This C code implements a callback update process for a distributed file system, specifically for the Kerberos Authentication Service (KAS). It manages callbacks between the KAS and its clients, ensuring that updates are propagated correctly across the network. The code handles tasks such as updating vnode states, discarding expired callbacks, and rescheduling updates to minimize latency.
utils.factor (git://github.com/mrjbq7/re-factor.git) Unknown · 88 lines
if_nfe.c
(https://bitbucket.org/freebsd/freebsd-head/)
C · 3374 lines
✨ Summary
This is a function that sets the Wake-on-LAN (WOL) settings for a network interface. It takes no arguments and returns nothing. The function first checks if the device has the Power Management Interface (PCI PM) capability, which is required for WOL. If it does, it then checks if the IFCAP_WOL
flag is set in the interface’s capabilities, indicating that WOL is enabled. If so, it sets the NFE_WOL_CTL
register to enable WOL and configures the MAC to have a 100Mbps, full-duplex link. It then enables RX and requests PME (Power Management Event) from the device’s power management controller if WOL is enabled. If the IFCAP_WOL
flag is not set, it clears the NFE_WOL_CTL
register to disable WOL.
This is a function that sets the Wake-on-LAN (WOL) settings for a network interface. It takes no arguments and returns nothing. The function first checks if the device has the Power Management Interface (PCI PM) capability, which is required for WOL. If it does, it then checks if the IFCAP_WOL
flag is set in the interface’s capabilities, indicating that WOL is enabled. If so, it sets the NFE_WOL_CTL
register to enable WOL and configures the MAC to have a 100Mbps, full-duplex link. It then enables RX and requests PME (Power Management Event) from the device’s power management controller if WOL is enabled. If the IFCAP_WOL
flag is not set, it clears the NFE_WOL_CTL
register to disable WOL.
xts.c
(http://photon-android.googlecode.com/svn/)
C · 292 lines
✨ Summary
This C code implements the XTS (XEX-based Tweakable Block Cipher) block cipher mode for Linux. It provides a cryptographic algorithm that combines two AES keys to create a secure encryption scheme. The code defines a set of functions and data structures to manage the XTS algorithm, including initialization, encryption, and decryption operations.
This C code implements the XTS (XEX-based Tweakable Block Cipher) block cipher mode for Linux. It provides a cryptographic algorithm that combines two AES keys to create a secure encryption scheme. The code defines a set of functions and data structures to manage the XTS algorithm, including initialization, encryption, and decryption operations.
bug.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 74 lines
✨ Summary
This C header file provides bug reporting functionality for the S390 architecture. It defines macros to emit a bug report, including __EMIT_BUG
and BUG
, which generate assembly code to print a message with the current file name and line number. The WARN_ON
macro checks if a condition is true and emits a warning if it is. It also includes definitions for HAVE_ARCH_BUG
and HAVE_ARCH_WARN_ON
.
This C header file provides bug reporting functionality for the S390 architecture. It defines macros to emit a bug report, including __EMIT_BUG
and BUG
, which generate assembly code to print a message with the current file name and line number. The WARN_ON
macro checks if a condition is true and emits a warning if it is. It also includes definitions for HAVE_ARCH_BUG
and HAVE_ARCH_WARN_ON
.
bar.dsp (https://swig.svn.sourceforge.net/svnroot/swig) Unknown · 147 lines
53 # ADD BSC32 /nologo
54 LINK32=link.exe
55 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
56 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib "$(RUBY_LIB)" /nologo /dll /debug /machine:I386 /out:"bar.dll" /pdbtype:sept
80 # ADD BSC32 /nologo
81 LINK32=link.exe
82 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386
83 # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib "$(RUBY_LIB)" /nologo /dll /machine:I386 /out:"bar.dll"
dvb_ca_en50221.c
(http://photon-android.googlecode.com/svn/)
C · 1743 lines
✨ Summary
This C code implements a DVB (Digital Video Broadcasting) CA EN50221 interface device driver for Linux. It initializes and manages a DVB adapter’s camera interface, handling tasks such as slot management, thread creation, and shutdown. The code provides a framework for interacting with the DVB adapter’s camera hardware, allowing users to access and control the camera’s functionality.
This C code implements a DVB (Digital Video Broadcasting) CA EN50221 interface device driver for Linux. It initializes and manages a DVB adapter’s camera interface, handling tasks such as slot management, thread creation, and shutdown. The code provides a framework for interacting with the DVB adapter’s camera hardware, allowing users to access and control the camera’s functionality.
721 /* it is possible we are dealing with a single buffer implementation,
722 thus if there is data available for read or if there is even a read
723 already in progress, we do nothing but awake the kernel thread to
724 process the data if necessary. */
725 if ((status = ca->pub->read_cam_control(ca->pub, slot, CTRLIF_STATUS)) < 0)
968 /**
969 * Kernel thread which monitors CA slots for CAM changes, and performs data transfers.
970 */
971 static int dvb_ca_en50221_thread(void *data)
time.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 216 lines
✨ Summary
This C code implements a clock source and interrupt handler for the PXA (PXA 250⁄300) processor’s OST (On-Time Stamp) timer. It sets up a clocksource with a resolution of at least 308 ns, generates interrupts based on the timer’s value, and provides a way to suspend and resume the timer during system sleep modes. The code is part of an embedded Linux system for a PXA-based device.
This C code implements a clock source and interrupt handler for the PXA (PXA 250⁄300) processor’s OST (On-Time Stamp) timer. It sets up a clocksource with a resolution of at least 308 ns, generates interrupts based on the timer’s value, and provides a way to suspend and resume the timer during system sleep modes. The code is part of an embedded Linux system for a PXA-based device.
config.sub
(https://swig.svn.sourceforge.net/svnroot/swig)
Shell · 1617 lines
✨ Summary
This shell script determines the operating system and CPU type of a given machine, and outputs them as a string. It uses a combination of environment variables, regular expressions, and conditional statements to make this determination. The output is a string that identifies the OS and CPU type, such as “sunos riscix” or “hpux mpeix”.
This shell script determines the operating system and CPU type of a given machine, and outputs them as a string. It uses a combination of environment variables, regular expressions, and conditional statements to make this determination. The output is a string that identifies the OS and CPU type, such as “sunos riscix” or “hpux mpeix”.
52 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
53 # or in some cases, the newer four-part form:
54 # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
55 # It is wrong to echo any other type of specification.
117 esac
119 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
120 # Here we must recognize all the valid KERNEL-OS combinations.
README.icn (http://photon-android.googlecode.com/svn/) Unknown · 149 lines
63 1 1 1 1 NOT ALLOWED!
65 The ICN driver may be built into the kernel or as a module. Initialization
66 depends on how the driver is built:
68 Driver built into the kernel:
70 The ICN driver can be configured using the commandline-feature while
135 where XX is either "1t" or "eu", depending on the D-Channel protocol
136 used on your S0-bus and Idstring is the Name of the card, given during
137 insmod-time or (for kernel-builtin driver) on the kernel commandline.
139 To load a 4B-card, the same command is used, except a second firmware
csr1212.c
(http://photon-android.googlecode.com/svn/)
C · 1468 lines
✨ Summary
This C code is part of a firmware implementation for a specific CPU architecture, likely the ARMv7-A. It reads and parses configuration data from a Config ROM image stored in memory. The code creates a hierarchical data structure to represent the configuration data, including directories, leaf entries, and cache regions. It also handles errors and invalid data, returning an error code if necessary.
This C code is part of a firmware implementation for a specific CPU architecture, likely the ARMv7-A. It reads and parses configuration data from a Config ROM image stored in memory. The code creates a hierarchical data structure to represent the configuration data, including directories, leaf entries, and cache regions. It also handles errors and invalid data, returning an error code if necessary.
clock-sh7203.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 85 lines
✨ Summary
This C code provides clock management functionality for the SH7203 processor, a type of CPU used in some embedded systems. It defines various clock operations and initializes them according to specific configuration settings. The code allows for different clock modes and frequency calculations based on the system’s configuration, ensuring proper clocking for the processor.
This C code provides clock management functionality for the SH7203 processor, a type of CPU used in some embedded systems. It defines various clock operations and initializes them according to specific configuration settings. The code allows for different clock modes and frequency calculations based on the system’s configuration, ensuring proper clocking for the processor.
configuring.txt (http://omnia2droid.googlecode.com/svn/trunk/) Unknown · 126 lines
17 There are a number of settings in the "Processor type and features" section of
18 the kernel configuration that need to be considered.
20 (*) "CPU"
22 The register and instruction sets at the core of the processor. This can
23 only be set to "FR40x/45x/55x" at the moment - but this permits usage of
24 the kernel with MB93091 CB10, CB11, CB30, CB41, CB60, CB70 and CB451
25 CPU boards, and with the MB93093 PDK board.
47 (*) "Reserve memory uncached for (PCI) DMA"
49 This requests that a uClinux kernel set aside some memory in an uncached
50 window for the use as consistent DMA memory (mainly for PCI). At least a
51 megabyte will be allocated in this way, possibly more. Any memory so
67 There are also a number of settings in the "Kernel Hacking" section of the
68 kernel configuration especially for debugging a kernel on this
69 architecture. See the "gdbstub.txt" file for information about those.
gpio.c
(http://photon-android.googlecode.com/svn/)
C · 203 lines
✨ Summary
This C code provides GPIO (General Purpose Input/Output) support for the S3C2410 processor, a chip used in various embedded systems. It allows users to configure and control GPIO pins, including setting pin modes, enabling pull-ups, and getting pin values. The code also manages interrupts associated with these pins, providing functions to get interrupt numbers based on pin numbers.
This C code provides GPIO (General Purpose Input/Output) support for the S3C2410 processor, a chip used in various embedded systems. It allows users to configure and control GPIO pins, including setting pin modes, enabling pull-ups, and getting pin values. The code also manages interrupts associated with these pins, providing functions to get interrupt numbers based on pin numbers.
s3c2410_udc.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 2055 lines
✨ Summary
This C code implements a USB gadget driver for Samsung’s Exynos SoCs, specifically the S3C2410 and S3C2440 processors. It provides a platform driver that manages the USB connection and allows devices to communicate with the host system. The code includes functions for probing, removing, suspending, and resuming the device, as well as registering and unregistering the driver.
This C code implements a USB gadget driver for Samsung’s Exynos SoCs, specifically the S3C2410 and S3C2440 processors. It provides a platform driver that manages the USB connection and allows devices to communicate with the host system. The code includes functions for probing, removing, suspending, and resuming the device, as well as registering and unregistering the driver.
led-triggers.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 265 lines
✨ Summary
This C code implements a Linux kernel module for managing LED triggers, which are used to control the brightness of LEDs on various devices. It provides functions for registering and unregistering LED triggers, setting default triggers, and triggering events to adjust LED brightness based on user input. The code uses locks and semaphores to ensure thread safety and manage access to shared data structures.
This C code implements a Linux kernel module for managing LED triggers, which are used to control the brightness of LEDs on various devices. It provides functions for registering and unregistering LED triggers, setting default triggers, and triggering events to adjust LED brightness based on user input. The code uses locks and semaphores to ensure thread safety and manage access to shared data structures.
corgi.h
(http://photon-android.googlecode.com/svn/)
C++ Header · 120 lines
✨ Summary
This C header file defines hardware-specific constants and structures for the SL-C7xx series of PDAs, specifically the Sharp Corgi device. It provides GPIO (General Purpose Input/Output) definitions, keyboard definitions, interrupt definitions, and SCOOP (System Control Operation Protocol) definitions, which are used to interact with the device’s hardware components.
This C header file defines hardware-specific constants and structures for the SL-C7xx series of PDAs, specifically the Sharp Corgi device. It provides GPIO (General Purpose Input/Output) definitions, keyboard definitions, interrupt definitions, and SCOOP (System Control Operation Protocol) definitions, which are used to interact with the device’s hardware components.
tape.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 404 lines
✨ Summary
This is a C header file that defines an interface for interacting with tape devices, such as magnetic tapes used in data storage and backup systems. It provides functions for initializing and cleaning up tape devices, opening and releasing them, sending commands to the device, and handling device sense information. The code also includes global variables for debugging and verbose output.
This is a C header file that defines an interface for interacting with tape devices, such as magnetic tapes used in data storage and backup systems. It provides functions for initializing and cleaning up tape devices, opening and releasing them, sending commands to the device, and handling device sense information. The code also includes global variables for debugging and verbose output.
pxa25x.c
(http://photon-android.googlecode.com/svn/)
C · 384 lines
✨ Summary
This C code initializes and configures hardware for a PXA25x processor, which is used in various embedded systems. It sets up clock controllers, GPIO pins, UARTs, and other peripherals, as well as registers system devices and platform devices. The code also handles power management, wake-up events, and interrupts. It’s likely part of an operating system or firmware for a specific device.
This C code initializes and configures hardware for a PXA25x processor, which is used in various embedded systems. It sets up clock controllers, GPIO pins, UARTs, and other peripherals, as well as registers system devices and platform devices. The code also handles power management, wake-up events, and interrupts. It’s likely part of an operating system or firmware for a specific device.
sembuf.h
(http://omnia2droid.googlecode.com/svn/trunk/)
C++ Header · 25 lines
✨ Summary
This C header file defines a structure for semid64_ds on x86 architecture, which is used to store information about semaphores. The structure includes fields for permissions, last operation time, change time, and number of semaphores in an array, with additional padding for 64-bit time_t and miscellaneous values to ensure compatibility between kernel and user space.
This C header file defines a structure for semid64_ds on x86 architecture, which is used to store information about semaphores. The structure includes fields for permissions, last operation time, change time, and number of semaphores in an array, with additional padding for 64-bit time_t and miscellaneous values to ensure compatibility between kernel and user space.
5 * The semid64_ds structure for x86 architecture.
6 * Note extra padding because this structure is passed back and forth
7 * between kernel and user space.
8 *
9 * Pad space is left for:
13 struct semid64_ds {
14 struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
15 __kernel_time_t sem_otime; /* last semop time */
16 unsigned long __unused1;
17 __kernel_time_t sem_ctime; /* last change time */
maple.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 893 lines
✨ Summary
This C code initializes and configures a Maple bus, a hardware abstraction layer for interacting with a specific type of graphics processing unit (GPU). It sets up DMA buffers, interrupt handlers, and device drivers to manage communication between the GPU and the system. The code also allocates memory for the bus’s data structures and registers the bus with the kernel.
This C code initializes and configures a Maple bus, a hardware abstraction layer for interacting with a specific type of graphics processing unit (GPU). It sets up DMA buffers, interrupt handlers, and device drivers to manage communication between the GPU and the system. The code also allocates memory for the bus’s data structures and registers the bus with the kernel.
12 */
13 #include <linux/init.h>
14 #include <linux/kernel.h>
15 #include <linux/device.h>
16 #include <linux/interrupt.h>
162 if (length) {
163 sendbuf = kzalloc(length * 4, GFP_KERNEL);
164 if (!sendbuf) {
165 ret = -ENOMEM;
187 struct mapleq *mq;
189 mq = kzalloc(sizeof(*mq), GFP_KERNEL);
190 if (!mq)
191 goto failed_nomem;
cpqphp_pci.c
(http://photon-android.googlecode.com/svn/)
C · 1560 lines
✨ Summary
This C code is part of a PCI (Peripheral Component Interconnect) hot plug management system. It manages resources allocated to a board, such as I/O, memory, and bus resources. The code sorts and combines these resources into a single list, allowing them to be returned to the available pool when the board is removed or replaced. It also destroys the resource lists when the board is no longer needed.
This C code is part of a PCI (Peripheral Component Interconnect) hot plug management system. It manages resources allocated to a board, such as I/O, memory, and bus resources. The code sorts and combines these resources into a single list, allowing them to be returned to the available pool when the board is removed or replaced. It also destroys the resource lists when the board is no longer needed.
29 #include <linux/module.h>
30 #include <linux/kernel.h>
31 #include <linux/types.h>
32 #include <linux/slab.h>
162 u16 temp_word;
164 fakedev = kmalloc(sizeof(*fakedev), GFP_KERNEL);
165 fakebus = kmalloc(sizeof(*fakebus), GFP_KERNEL);
727 pci_bus_read_config_byte(pci_bus, devfn, PCI_SUBORDINATE_BUS, &temp_byte);
729 bus_node = kmalloc(sizeof(*bus_node), GFP_KERNEL);
730 if (!bus_node)
731 return -ENOMEM;
743 if ((b_base <= b_length) && (save_command & 0x01)) {
744 io_node = kmalloc(sizeof(*io_node), GFP_KERNEL);
745 if (!io_node)
746 return -ENOMEM;
matroxfb_Ti3026.c
(http://omnia2droid.googlecode.com/svn/trunk/)
C · 746 lines
✨ Summary
This C code initializes and configures a Matrox Millennium graphics card, specifically the Ti3026 model. It sets up the card’s registers, initializes the RAMDAC, and configures the output settings for the primary display. The code also handles various device flags and preserves certain VGA I/O settings to ensure compatibility with older systems.
This C code initializes and configures a Matrox Millennium graphics card, specifically the Ti3026 model. It sets up the card’s registers, initializes the RAMDAC, and configures the output settings for the primary display. The code also handles various device flags and preserves certain VGA I/O settings to ensure compatibility with older systems.
9 * Version: 1.65 2002/08/14
10 *
11 * MTRR stuff: 1998 Tom Rini <trini@kernel.crashing.org>
12 *
13 * Contributors: "menion?" <menion@mindless.com>
17 * Betatesting, fixes, ideas, videomodes, videomodes timmings
18 *
19 * "Tom Rini" <trini@kernel.crashing.org>
20 * MTRR stuff, PPC cleanups, betatesting, fixes, ideas
21 *
posixemulation.py
(git://github.com/mitsuhiko/werkzeug.git)
Python · 107 lines
✨ Summary
This Python code provides a POSIX emulation for renaming files on Windows systems, allowing for atomic and pseudo-atomic renames. It uses ctypes to interact with Windows API functions and handles cases where the target file already exists. The rename function falls back to traditional OS.rename if atomic rename fails.
This Python code provides a POSIX emulation for renaming files on Windows systems, allowing for atomic and pseudo-atomic renames. It uses ctypes to interact with Windows API functions and handles cases where the target file already exists. The rename function falls back to traditional OS.rename if atomic rename fails.
38 _MOVEFILE_REPLACE_EXISTING = 0x1
39 _MOVEFILE_WRITE_THROUGH = 0x8
40 _MoveFileEx = ctypes.windll.kernel32.MoveFileExW
42 def _rename(src, dst):
58 _CreateTransaction = ctypes.windll.ktmw32.CreateTransaction
59 _CommitTransaction = ctypes.windll.ktmw32.CommitTransaction
60 _MoveFileTransacted = ctypes.windll.kernel32.MoveFileTransactedW
61 _CloseHandle = ctypes.windll.kernel32.CloseHandle