37
• GLib https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and- online-course.html

GLib

Embed Size (px)

Citation preview

Page 1: GLib

• GLib

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 2: GLib

GLib

1 GLib was released as a separate library so other developers, those who did not make use of the GUI-

related portions of GTK+, could make use of the non-GUI portions of the

library without the overhead of depending on the entire GUI library.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 3: GLib

GLib

1 Since GLib is a cross-platform library, applications using it to interface with

the operating system are usually portable across different operating systems without major changes.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 4: GLib

GLib - Features

1 GLib provides advanced data structures, such as memory chunks, doubly and

singly linked lists, hash tables, dynamic strings and string utilities, such as a lexical scanner, string chunks (groups of strings), dynamic arrays, balanced binary trees, N-ary trees, quarks (a two-way association of

a string and a unique integer identifier), keyed data lists, relations and tuples.

Caches provide memory management.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 5: GLib

GLib - Features

1 GLib implements functions that provide threads, thread programming

and related facilities such as primitive variable access, mutexes,

asynchronous queues, secure memory pools, message passing and

logging, hook functions (callback registering) and timers. Also

message passing facilities such as byte order conversion and I/O

channels.https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 6: GLib

GLib - Features

1 Some other features of GLib include:

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 7: GLib

GLib - Similar projects

1 The Apache Portable Runtime and Apple Core Foundation have a large

functional overlap with GLib, and provide many similar OS-portable

threading, network and data structure implementations in C.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 8: GLib

GLib - Similar projects

1 For C++, the Boost (C++ libraries) provide some functionality, such as threading primitives, similar to what

GLib does for C.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 9: GLib

Embedded GLIBC

1 Embedded GLIBC (EGLIBC) is a variant of the GNU C Library (glibc),

optimised for use in embedded devices, while still attempting to

remain source- and binary-compatible with the standard glibc.

The authors claim that EGLIBC is not intended to be a fork of glibc, but

rather a variant, accepting patches that the core glibc developers may

reject.https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 10: GLib

Embedded GLIBC

1 On 6 May 2009, it was announced that Debian would move from the GNU C

Library to EGLIBC, citing problems with the development process of glibc. Debian

and several of its derivatives now ship EGLIBC instead of glibc. EGLIBC is free software licensed under the GNU LGPL.

The EmbToolkit build system can provide an EGLIBC toolchain for embedded Linux,

but is not part of the EGLIBC project.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 11: GLib

Glibc

1 The 'GNU C Library', commonly known as 'glibc', is the GNU Project's implementation of the C

standard library. Originally written by the Free Software Foundation (FSF) for the GNU

Operating System, the library's development had been overseen by a committee since 2001, with Ulrich Drepper as the lead contributor and

maintainer. In March 2012, the steering committee voted to disband itself, in favor of a community-driven development process, with Ryan Arnold, Maxim Kuvyrkov, Joseph Myers,

Carloshttps://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 12: GLib

Glibc

1 Released under the GNU Lesser General Public License, glibc is free software.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 13: GLib

Glibc - History

1 glibc was initially written mostly by Roland McGrath, working for the Free

Software Foundation (FSF) in the 1980s.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 14: GLib

Glibc - History

1 In February 1988, FSF described glibc as having nearly completed the

functionality required by ANSI C. By 1992, it had the ANSI C-1989 and

POSIX.1-1990 functions implemented and work was under way on POSIX.2.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 15: GLib

Glibc - A temporary fork

1 In the early 1990s, the developers of the Linux kernel fork (software

development)|forked glibc. Their fork, called Linux libc, was

maintained separately for years and released versions 2 through 5.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 16: GLib

Glibc - A temporary fork

1 When FSF released glibc 2.0 in January 1997, it had much more complete POSIX

standards compliance, better internationalisation and multilingual

function, IPv6 capability, 64-bit data access, facilities for multithreaded applications,

future version compatibility, and the code was more portable. At this point, the Linux kernel developers discontinued their fork

and returned to using FSF's glibc.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 17: GLib

Glibc - A temporary fork

1 The last used version of Linux libc used the internal name (soname) libc.so.5.

Following on from this, glibc 2.x on Linux uses the soname libc.so.6 (DEC Alpha|Alpha and Itanium|IA64 architectures

now use libc.so.6.1, instead). The soname is often abbreviated as libc6 (for example in the package name in Debian)

following the normal conventions for libraries.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 18: GLib

Glibc - A temporary fork

1 According to Richard Stallman, the changes that had been made in

Linux libc could not be merged back into glibc because the authorship

status of that code was unclear and the GNU project is quite strict about

recording copyright and authors.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 19: GLib

Glibc - Supported hardware and kernels

1 Glibc is used in systems that run many different kernel (computer

science)|kernels and different Computer hardware|hardware

architectures

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 20: GLib

Glibc - Functionality

1 glibc provides the functionality required by the Single UNIX Specification, POSIX (1c, 1d, and 1j) and some of the functionality required by

International Organization for Standardization|ISO C11, International Organization for

Standardization|ISO C99, Berkeley Unix (BSD) interfaces, the System V Interface Definition

(SVID) and the X/Open Portability Guide (XPG), Issue 4.2, with all extensions common to XSI

(X/Open System Interface) compliant systems along with all X/Open UNIX extensions.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 21: GLib

Glibc - Functionality

1 In addition, glibc also provides extensions that have been deemed

useful or necessary while developing GNU.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 22: GLib

Glibc - Use in small devices

1 Alternative libcs are Bionic (software)|Bionic (based mostly on BSD libc|libc from BSD and used in

Android (Operating System)|Android), dietlibc, uClibc, Newlib, Klibc, musl, and EGLIBC (used in Debian, Ubuntu (Operating System)|Ubuntu and Ark

Linux).

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 23: GLib

Embedded GLIBC

1 'Embedded GLIBC' ('EGLIBC') is a variant of the GNU C Library (glibc), optimised for use in embedded devices, while still attempting

to remain source- and binary-compatible with the standard glibc. The authors claim that EGLIBC is not intended to be a Fork (software development)|fork of glibc, but

rather a variant, accepting patches that the core glibc developers may

reject.[http://www.eglibc.org/faq EGLIBC: FAQ]

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 24: GLib

Embedded GLIBC

1 The EmbToolkit build system can provide an EGLIBC toolchain for

embedded Linux, but is not part of the EGLIBC project.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 25: GLib

GObject - Relation to GLib

1 Though GObject has its own separate set of documentation[https://developer.gnome.org/gobject/stable/ GObject Reference Manual] and is usually compiled into its own shared

library file, the source code for GObject resides in the GLib source tree and is

distributed along with GLib. For this reason, GObject uses the GLib version numbers and is typically packaged together with GLib (for

example, Debian puts GObject in its libglib2.0 package family).

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 26: GLib

Glibenclamide

1 'Glibenclamide' (International Nonproprietary Name|INN), also known as 'glyburide' (United States Adopted Name|USAN), is an antidiabetic drug in a class of

medications known as sulfonylureas, closely related to sulfa drugs. It was

developed in 1966 in a cooperative study between Boehringer Mannheim (now part

of Hoffmann–La Roche|Roche) and Hoechst AG|Hoechst (now part of Sanofi-Aventis).

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 27: GLib

Glibenclamide

1 It is sold in doses of 1.25, 2.5, and 5mg, under the trade names Diabeta, Glynase, and Micronase in the United States and

Daonil, Semi-Daonil, and Euglucon in the United Kingdom, and Delmide in India. It is

also sold in combination with metformin under the trade names Glucovance,

Benimet, and Glibomet, as well as Glucored and Glucored Forte (by Sun Pharmaceutical) in Russia, Belarus and other countries of the

CIS.https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 28: GLib

Glibenclamide - Mechanism of action

1 After a cerebral ischemic insult, the blood–brain barrier is broken and glibenclamide

can reach the central nervous system. Glibenclamide has been shown to bind more

efficiently to the ischemic hemisphere. Moreover, under ischemic conditions SUR1, the regulatory subunit of the KATP- and the

NCCa-ATP-channels, is expressed in neurons, astrocytes, oligodendrocytes,

endothelial cells and by reactive microglia.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 29: GLib

Glibenclamide - Side effects and contraindications

1 Glibenclamide may be contraindicated in those with G6PD deficiency, as it may cause acute

haemolysis.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 30: GLib

Glibenclamide - Side effects and contraindications

1 Recently published data suggest glibenclamide is associated with

significantly higher annual mortality when combined with metformin than other insulin-secreting medications, after correcting for other potentially confounding patient characteristics. The safety of this combination has

been questioned.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 31: GLib

Glibenclamide - Side effects and contraindications

1 Glibenclamide causes cholestasis as the major side

effect.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 32: GLib

Glibenclamide - Synthesis

1 The N-acetyl derivative of β-phenethylamine is reacted with

chlorosulfonic acid to form the para sulfonyl chloride derivative. This is then subjected to

ammonolysis, followed by base-catalyzed removal of the acetamide. This is then

acylated with 2-methoxy-5-chlorobenzoic acid chloride to give the amide

intermediate. This is then reacted with cyclohexyl isocyanate to yield the

sulfonylurea glibenclamide.https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 33: GLib

Glibenclamide - Analogs

1 Additional glibenclamide structural analogs have been prepared by Ahmadi et al.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 34: GLib

Glibenclamide - Research

1 Glibenclamide improves outcome in animal stroke models by preventing

brain swelling and enhancing neuroprotection. A retrospective study showed, in type 2 diabetic

patients already taking glyburide, NIH stroke scale scores on were

improved on discharge compared to diabetic patients not taking

glyburide.https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 35: GLib

Event loop - GLib event loop

1 While GLib has built-in support for file descriptor and child termination events, it is possible to add an event

source for any event that can be handled in a prepare-check-dispatch model.[http://developer.gnome.org/gl

ib/2.30/glib-The-Main-Event-Loop.html#mainloop-states]

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html

Page 36: GLib

Event loop - GLib event loop

1 Application libraries that are built on the GLib event loop include

GStreamer and the asynchronous I/O methods of GnomeVFS, but GTK+

remains the most visible client library. Events from the windowing

system (in X Window System|X, read off the X Unix domain socket|socket)

are translated by GDK into GTK+ events and emitted as GLib signals on the application's widget objects.

https://store.theartofservice.com/itil-2011-foundation-complete-certification-kit-fourth-edition-study-guide-ebook-and-online-course.html